473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Paramater for cnn.EXECUTE?

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

set rs = cnn.execute("EXEC tblListings_qry2")
Jul 19 '05 #1
3 3809
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" <ja***@catamaranco.com> wrote in message
news:eW**************@TK2MSFTNGP10.phx.gbl...
How does one pass a parameter to the EXEC query recordset:

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

Jul 19 '05 #2
> 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...
Jul 19 '05 #3
Thanks -it is a stored qry for Access.

"Tom B" <sh*****@hotmail.com> wrote in message
news:u3**************@TK2MSFTNGP09.phx.gbl...
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" <ja***@catamaranco.com> wrote in message
news:eW**************@TK2MSFTNGP10.phx.gbl...
How does one pass a parameter to the EXEC query recordset:

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


Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: WertmanTheMad | last post by:
Ok, This sounds dangerous (and yes I know it is) But its in a controlled enviroment and I really need to know how to do this. How can I pass a Subquery for an Exist or In clause as a...
9
by: PyPK | last post by:
Hi if I have a function called tmp=0 def execute(): tmp = tmp+1 return tmp also I have def func1(): execute() ....
3
by: Glenn Davy | last post by:
hi Is it possible to have a storedprocedure with a parameter as a rowsource to a combo/list box: e.g. me.cbMyCombo.rowsource='exec spMyLookup @Key=12345' or ...
2
by: Max Adams | last post by:
Question about using delegates with a string paramater to return a ListViewItem object... All, I have a thread and I want this thread to post messages to the main GUI thread using a delegate....
2
by: Brad Wood | last post by:
I have a method that takes a ref string parameter. This is because it will be called in loops and most of the time it will not need to modify the paramater at all, so I preferred not to return a...
1
by: Chris | last post by:
Hi I have a problem populating my datagrid when the values passed have an apostrophie (') like this test's. Any other values work. This is my asp.net cod Private Sub Page_Load(ByVal sender As...
0
by: Matt Swift | last post by:
Anyone have experience of doing this? My aim is thus. I'd like to supply my SP with datetime related information, but possibly break entries down into **/**/**** and have the interface actually...
5
by: Frank Jovi | last post by:
I am working on a website with ASP.NET 2.0 I started with a SQL database .mdf. After further discussions with my client, we decided to switch to an Access database. I created a Select query...
2
by: Jim Langston | last post by:
In my function/method paramater list I try to keep constant correctness. I.E. I would use: int Foo( const char* a, int b ) instead of int Foo( char* a, int b ) My question reguards int b. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.