Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 07:29 AM
jason
Guest
 
Posts: n/a
Default Paramater for cnn.EXECUTE?

How does one pass a parameter to the EXEC query recordset:

set rs = cnn.execute("EXEC tblListings_qry2")


  #2  
Old July 19th, 2005, 07:29 AM
Tom B
Guest
 
Posts: n/a
Default Re: Paramater for cnn.EXECUTE?

Assuming that tblListings_qry2 is a stored procedure than you would just
append it

Set RS=cnn.Execute("EXEC tblListings_qry2 5")

if there are multiple parameters, you just separate them with commas

Set RS=cnn.Execute("EXEC tblListings_qry2 5,3,'Bob''s your uncle', 99,
'hello','etc',1")

"jason" <jason@catamaranco.com> wrote in message
news:eWmc5zRXDHA.1888@TK2MSFTNGP10.phx.gbl...[color=blue]
> How does one pass a parameter to the EXEC query recordset:
>
> set rs = cnn.execute("EXEC tblListings_qry2")
>
>[/color]


  #3  
Old July 19th, 2005, 07:29 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: Paramater for cnn.EXECUTE?

> set rs = cnn.execute("EXEC tblListings_qry2")

Numeric:

set rs = cnn.execute("EXEC tblListings_qry2 5")
set rs = cnn.execute("EXEC tblListings_qry2 @paramName = 5")

String:

set rs = cnn.execute("EXEC tblListings_qry2 'bob'")
set rs = cnn.execute("EXEC tblListings_qry2 @paramName = 'bob'")

I'd tell you how to pass dates, but you didn't bother telling us which
database you're using...


  #4  
Old July 19th, 2005, 07:29 AM
jason
Guest
 
Posts: n/a
Default Re: Paramater for cnn.EXECUTE?

Thanks -it is a stored qry for Access.

"Tom B" <shuckle@hotmail.com> wrote in message
news:u3ehr5RXDHA.2200@TK2MSFTNGP09.phx.gbl...[color=blue]
> Assuming that tblListings_qry2 is a stored procedure than you would just
> append it
>
> Set RS=cnn.Execute("EXEC tblListings_qry2 5")
>
> if there are multiple parameters, you just separate them with commas
>
> Set RS=cnn.Execute("EXEC tblListings_qry2 5,3,'Bob''s your uncle', 99,
> 'hello','etc',1")
>
> "jason" <jason@catamaranco.com> wrote in message
> news:eWmc5zRXDHA.1888@TK2MSFTNGP10.phx.gbl...[color=green]
> > How does one pass a parameter to the EXEC query recordset:
> >
> > set rs = cnn.execute("EXEC tblListings_qry2")
> >
> >[/color]
>
>[/color]


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles