Invalid Cursor State State ID: 24000

Has anyone seen this error before :

The following ODBC error occrued:

Error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State State ID:24000

This error occured when trying to import objects on NAV 4.03 Update 6 running on SQL2K5

Thank you

That error message can be related to out of space in SQL Server. It’s the only clue I have now.

Good call!

I got this from msdn (State ID 2400 just means that its an invalid cursor state error)

  • In SQL Server Enterprise Manager, you may receive the “Invalid cursor state” error message when Microsoft® SQL Server™ runs out of resources while attempting to save selected tables or a database diagram. This error is returned because of insufficient space in your database or transaction log to complete the save process. To correct this problem, check to see if whether the database or the transaction log is full. If so, increase the size of the database to accommodate the change. Check other system resources or contact your system administrator.

The problem has releted to out of disk space?

At the end of the day, this was a SQL replication issue. A SQL Server replication trigger was firing that was stoppping the navision alter to fail.

We tested this by creating a small table and then adding new fields to the table. While the orginal create worked, the addition of new fields caused the Cursor State error.

Another intrestign thing is that performing a schema change via SQL Server directly worked, but the same schema change via NAV caused the error above.

We got around the error by disabling the system trigger and reenabiling it after the objects where deployed.

Forgot to mention we got to the root of the issue through profiling the SQL statements being generated by Nav and foudn the trigger that was firing.

Thanks a lot for the feedback, I was very interested in what caused that issue, especially since there doesn’t seem to be any documentation about that SQL State ID number.