473,573 Members | 3,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Paramater for cnn.EXECUTE?

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

set rs = cnn.execute("EX EC tblListings_qry 2")
Jul 19 '05 #1
3 3820
Assuming that tblListings_qry 2 is a stored procedure than you would just
append it

Set RS=cnn.Execute( "EXEC tblListings_qry 2 5")

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

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

"jason" <ja***@catamara nco.com> wrote in message
news:eW******** ******@TK2MSFTN GP10.phx.gbl...
How does one pass a parameter to the EXEC query recordset:

set rs = cnn.execute("EX EC tblListings_qry 2")

Jul 19 '05 #2
> set rs = cnn.execute("EX EC tblListings_qry 2")

Numeric:

set rs = cnn.execute("EX EC tblListings_qry 2 5")
set rs = cnn.execute("EX EC tblListings_qry 2 @paramName = 5")

String:

set rs = cnn.execute("EX EC tblListings_qry 2 'bob'")
set rs = cnn.execute("EX EC tblListings_qry 2 @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*****@hotmai l.com> wrote in message
news:u3******** ******@TK2MSFTN GP09.phx.gbl...
Assuming that tblListings_qry 2 is a stored procedure than you would just
append it

Set RS=cnn.Execute( "EXEC tblListings_qry 2 5")

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

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

"jason" <ja***@catamara nco.com> wrote in message
news:eW******** ******@TK2MSFTN GP10.phx.gbl...
How does one pass a parameter to the EXEC query recordset:

set rs = cnn.execute("EX EC tblListings_qry 2")


Jul 19 '05 #4

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

Similar topics

6
4517
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 paramater Something like this CREATE procedure dbo.mytry
9
9369
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
7278
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 me.cbMyCombo.rowsource='spMyLookup 12345'
2
1627
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. This is my code fragment: ListViewItem lview = m_form.Invoke( m_form.m_DelegateAddItem, new object {"hello"} );
2
1278
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 newly allocated string object. I need to pass items of an array list (can't use specialized collection in compact framework) to this method. I...
1
928
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 System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa 'Put user code to initialize the page her Dim s As String =...
0
1027
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 offer DDLs in place of the standard TextBox fields that ReportingServices places for paramater entry as default. If there's a way anyone knows...
5
7270
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 that has a parameter that is a comma delimited string brought in through a paramater in to the <selectcommand=...> The query worked perfectly before,...
2
1887
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. Would it be more correct to make it int Foo( const char* a, const int b ) instead? I do know the effect of this would be that I can't change b in the...
0
7777
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8016
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7773
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8061
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6411
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5289
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3730
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3731
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2197
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.