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 2005 Forums
 Transact-SQL (2005)
 sp_cursoropen/sp_cursorprepare: error

Author  Topic 

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2010-03-23 : 12:21:27
Hi friends ,

i am getting this error when i am using my classic asp application.

Microsoft OLE DB Provider for SQL Server (0x80040E14)
sp_cursoropen/sp_cursorprepare: The statement parameter can only be a batch or a stored procedure with a single select, without FOR BROWSE, COMPUTE BY, or variable assignments.

i am not using any cursor though it says cursor in the error.

Please let me know the reason for it?

Thank you

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-25 : 03:37:01
Can you post the code that cuased the error?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2010-03-29 : 12:21:22
Hi friends , after researching for a while i fsolved my problem
My ADo connection previously which was throwing the error was this:

objRS.Open SQLCmd,strConnect1, adOpenDynamic, adLockOptimistic, adCmdText

so when i changed the ado open method to this

objRS.Open SQLCmd,strConnect1, adOpenForwardOnly, adLockReadOnly, adCmdText it fixed the problem as i was using only multiple select statements which had to be passes at one go.

so adOpenForwardOnly was sufficient rather than adOpenDynamic cursor type.

Hope this helps anyone who have similar issues.

Btw thanks madhivanan for repsonding
Go to Top of Page
   

- Advertisement -