Quote:
>I have a MS SQLServer 6.0 stored procedure taking one parameter, and
>returning two result sets (it has two select statements). I use a
>rdoPreparedStatement to represent this stored procedure in VB 4.0.
>When I use OpenResultSet on the prepared statement, I get an error
>stating that it is not possible to make a cursor on a stored procedure
>returning more than one result set!
>Why can't I open result sets without a cursor?
You must use ODBC cursors when you make the connection. You probably
have opened the connection with the default cursor driver of
rdUseIfNeeded. With this parameter, Server Side curors will be used
even though The Microsoft SQL Server server-side cursors do not
support result sets that return more than a single set of results. To
enable the ODBC cursor driver, set the rdoEnvironment object's
CursorDriver property to rdUseODBC before creating the cursor.
Ex) object.CursorDriver = rdUseODBC
Robert Carpenter