Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using Dynamic SQL statement in Stored Proc.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-10-22 : 08:20:43
Santy writes "Hello,

I am creating dynamic sql statement in stored procedure and executing it from my asp page, but at the time of opening the resultset using ADO for paging it creates error as

ADODB.Recordset error '800a0cb3'

Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

the following is the command :

rs.open sql, adocon,aduseclient,adLockReadOnly

Can any one help me

Santy"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2002-10-22 : 10:57:53
I think you've a mismatch between aduseclient,adLockReadOnly ....

try some other combinations and see if they work.....(some are faster than others, some work differently to others...look at BOL for more info...)

Go to Top of Page

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2002-10-22 : 22:37:17
AndrewMurphy is right, your'e missing a CursorType here
INCORRECT: rs.open sql, adocon,aduseclient,adLockReadOnly
CORRECT: rs.open source, connection,cursortype,locktype
AdUseClient is a CursorLocation, not a cursortype. Valid cursortypes are AdOpenForwardOnly, AdOpenDynamic, AdOpenKeyset, and AdopenStatic. The reason you are getting this particular error is that since you were not specifying a correct cursortype your cursor was defaulting to AdOpenForwardOnly, which is the default (for server side cursors) and Forward Only cursors do not support bookmarks. If you want a client side cursor you must specify rs.cursorlocation = adUseClient separately, and then open the recordset with an AdOpenStatic, the only type allowed for client side cursors.

Sarah Berger MCSD

Edited by - simondeutsch on 10/22/2002 22:38:03
Go to Top of Page
   

- Advertisement -