|
-
May 21st, 2001, 11:37 PM
#1
Stored Procedures
I am trying to convert my code using Recordset
...
Set RS2VCP = New ADODB.Recordset
RS2VCP.Open "Select VCPName, VCPStat, VCPErrs From TempVCP", cn, adOpenDynamic, adLockOptimistic
...
to stored procedures where i get the returns of the records. how will i do these using stored procedures. do u have sample code?
thanks for any help..
cecile
The more u read, the more u do not know
-
May 22nd, 2001, 01:04 AM
#2
Re: Stored Procedures
Read information from MSDN
*************
Executes the query, SQL statement, or stored procedure specified in the CommandText property.
Syntax
For a row-returning Command:
Set recordset = command.Execute( RecordsAffected, Parameters, Options )
Return Value
Returns a Recordset object reference.
Parameters
RecordsAffected Optional. A Long variable to which the provider returns the number of records that the operation affected. The RecordsAffected parameter applies only for action queries or stored procedures. RecordsAffected does not return the number of records returned by a result-returning query or stored procedure. To return this information, use the RecordCount property.
Parameters Optional. A Variant array of parameter values passed with an SQL statement. (Output parameters will not return correct values when passed in this argument.)
**************
This is information help you
Andy Tower
-
May 22nd, 2001, 01:11 AM
#3
Re: Stored Procedures
the procedure:
CREATE PROC sp_MyProcedure
as
SELECT VCPName, VCPStat, VCPErrs,
FROM TempVCP
the vb code
set RS2VCP = cn.Execute("sp_MyProcedure")
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
May 22nd, 2001, 03:12 AM
#4
Re: Stored Procedures
I get it.. but then it does not return any recordset..
if i write
Set RS2VCP = new ADODB.Recordset
Set RS2VCP = cn.Execute("OpenTempVCP")
I cannot write
RS2VCP.EOF
pls help guys..thanks
cecile
The more u read, the more u do not know
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|