This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C1A403.A4A63E20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hi,
if u have worked on ORACLE before, then u need to return a Ref Cursor in
to simulate a "Select" statement from within a Stored Proc.
If u are using SQL Server, this not required. This could be ur code in
SQL server.
SQLSVR7.0 code:
Create Procedure sp_GET_AUTHORS
begin
-- First SELECT
select * from authors;
-- Second SELECT
select * from titles;
end
ADO will pick up the cursors created by the above statements
automatically and return as a Recordset object.
multiple Select statements can be accessed from the front end by the
following code
oRs.open "sp_GET_AUTHORS",oCon ' oCon being the connection object. Works
fine also when u use a 'command object
' by default the cursor returned by the first Select statement will be
returned in the RS
set oRs1 =3D oRs.nextrecordset '
'This statement will set the cursor created by the second Select
statement in the oRS1 object
Trust this should help solve ur query
cheers
AJAX=AE.
----- Original Message -----
From: Mohideen
To: professional vb
Sent: Wednesday, January 23, 2002 9:37 AM
Subject: [pro_vb] Stored proc in VB
Backend is : sql server 7.0
----- Original Message -----=3D20
From: Mohideen=3D20
To: professional vb=3D20
Sent: Tuesday, January 22, 2002 1:06 PM
Subject: [pro_vb] Stored proc in VB
How to create a recordset in vb by calling stored procedure, which
returns a cursor as an output parameter.
Or
How to call a stored proce which returns a cursor.
Thanks
Mohideen
$subst('Email.Unsub').