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
 General SQL Server Forums
 New to SQL Server Programming
 Invalid cursor position

Author  Topic 

psangeetha
Yak Posting Veteran

95 Posts

Posted - 2008-11-19 : 07:18:48
Hi all,

User has reported an error from the application error log:



SQL Code:|0|SQL Error:|(0) - [Microsoft][ODBC SQL Server Driver]Invalid cursor position|
Read on MLIST: ||||


MLIST is a table, I believe the code is reading this table and throwing this error.

Has anyone come across this error before???

Also, s it possible to generate sql error logs in sql server??

Thanks a lot.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-19 : 07:20:59
We will have to see the code.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

psangeetha
Yak Posting Veteran

95 Posts

Posted - 2008-11-19 : 09:06:00
Okay. Thanks for your reply.

I've requested the application team to provide me with the code.

But is it possible to get the sql code from the error log?? I tried looking at the SQL Management Studio, the SQL server logs. But the logs only show the Login attempts and not any other information.

Thank you.
Go to Top of Page

psangeetha
Yak Posting Veteran

95 Posts

Posted - 2008-11-19 : 09:25:09
Hi,

I just looked at the SQL Code on the application side. It is a 50lines code and straightforward, basically does:

select * from mlist where col1= value, col2=value
execute begin
insert into slist values ( ) --The record read above is being
inserted here into this new
table slist.

delete from mlist where --The record is deleted in mlist.

commit work;
unlock mlist;
unlock slist;

-- There are 4000 records in mlist for the where clause condition. But only 2000 records have been inserted into slist. When we close the session and open a new session and run the code, the rest of 2000 records are inserted.

Could be any resource issue?? Or is it possible to increase number of cursors, if that may be the cause?

Thank for all your help.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-19 : 09:37:18
UNLOCK are not Microsoft SQL Server commands.
Try your best shot over at www.dbforums.com and go to the forum for your RDBMS.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

psangeetha
Yak Posting Veteran

95 Posts

Posted - 2008-11-19 : 09:42:54
Sorry, thats from our application code. But when that part of the code is running, we get this error message.

SQL Error:|(0) - [Microsoft][ODBC SQL Server Driver]Invalid cursor position|
Read on MLIST: ||||

Go to Top of Page
   

- Advertisement -