Invalid Cursor State

girish.joshigirish.joshi Member Posts: 407
edited 2010-06-04 in SQL General
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

Answers

  • girish.joshigirish.joshi Member Posts: 407
    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.
  • DenSterDenSter Member Posts: 8,307
    So now you know what the error means, what did you do to solve the issue? Were the two problems you were having yesterday related to the same issue?
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from Navision forum to SQL General forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • ara3nara3n Member Posts: 9,256
    it was related to replication.
    the table was setup to be replicated.
    Removed the replication, and it solved the problem
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • mikkamikka Member Posts: 4
    we have the same problem.
    but our customer don´t use replication.

    SQL-Server 2005 64-Bit
    32 GB Ram

    MSSQL Version
    MSSQL 2005 9.00.4035.00
    Data Access Components 2000.086.3959.00
    (SRV_SP2_RTM.070216-1-1710)

    Navision Version
    4.0.3.26954 (4.0 SP3 with Hotfix KB 954672)

    thank you for every / any hints

    BTW: the servers are clustered!
  • wicwic Member Posts: 96
    any suggestion?
    same problem on big batch job, (3'000'000 records to generate, hangs after 168'000) something with the size/full log could be correct but the SQL 2008 Database is in SIMPLE mode and with auto-increase size... Mybe the RAM? it runs on my computer- Dev environment (Win7 64 bits / SQL 2008R2 64 Bits / 4GB RAM).

    Should I put some COMMIT (every 1000 records?) but if it hangs, where should I begin again ](*,) ?

    Any idea is welcome!

    Regards

    Chris
    #### Only one can survive ######
  • wicwic Member Posts: 96
    :shock: it's complicated... it looks like the IF INSERT THEN; condition to avoid the raising of primary key violation error has no good effects with the INIT command, so I had to put a IF NOT GET(myPK) THEN "do the code"

    Old code:
    table.init
    table.PK := value1;
    table.Field1 := value2;
    if table.insert then;

    New code:
    if NOT table2.get(value1) then begin
    table.init
    table.PK := value1;
    table.Field1 := value2;
    if table.insert then;
    end;

    it works, my 3471530 records were imported! \:D/

    thank you MS-support!
    #### Only one can survive ######
Sign In or Register to comment.