Click to See Complete Forum and Search --> : How to govern what type of recordset is returned from a SQL stored procedure?


Keith Greeley
October 19th, 1999, 11:15 AM
I have created an ODBC connection and run a SQL stored procedure name. It seems as though the only type of recordset that it returns from a stored procedure is a 'forward-only' type.

Dim rsTemp as Recordset
Set rsTemp=Connection.Openrecordset("myprocedure",dbOpendynamic)

(although in this case I want the dynamic type recordset)

The strange thing is, if I substituted the procedure name "myprocedure" with straighforward SQL syntax, it has no problem returning my the recordset of my choice

How do I control what type of recordset is returned from calling a SQL stored procedure ?

Thankyou if you can help

Keith

Roy H
October 19th, 1999, 02:28 PM
The following is from the ADO documentation regarding using a connection or command object to open a recordset:

The returned Recordset object is always a read-only, forward-only cursor. If you need a Recordset object with more functionality, first create a Recordset object with the desired property settings, then use the Recordset object's Open method to execute the query and return the desired cursor type.

Good Luck,
Roy