Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    BA, Argentina
    Posts
    39

    Unanswered: Whats wrong with cursors???

    Hi, I recently modified all the messages with severity 15 and 16 to be logged in windows applications log... I then discovered that my Application is generating lots of errors of type:

    Error: 16945, Severity: 16, State: 1
    The cursor was not declared.

    followed by

    Error: 16955, Severity: 16, State: 2
    Could not create an acceptable cursor.

    I think this error is occuring since a lot, but I discovered it now because I recently modified which messages are logged (I added those with severity of 15 and 16).

    This error is occuring everytime (one error every 3 minutes!!)... I dont know what part of my app is having trouble, i think its a bug of sql server... Does somebody know anything about this error?

    Thanks!!

  2. #2
    Join Date
    May 2003
    Location
    UK
    Posts
    220
    Dude,

    Cursors are basically nasty nasty things that we try and avoid.
    They are very resource hungry and slow the server. In some instances they are useful ( like rolling back & forth during updates and the like ) but mostly you can use temp tables and a few WHILE ( ...... ) loops work wonders for speed and flexibility.

    Cheers,

    SG

  3. #3
    Join Date
    Oct 2003
    Location
    BA, Argentina
    Posts
    39
    Thanks!!! But I'm not using cursors....I thought I was using some, but today I reviewed all my user defined functions and stored procs and i found no one.
    My "theory" is this: I'm accessing the DB with ADO 2.7, I mean, with recordsets... Am I wrong, or Recordsets are implemented with cursors ??? Occasionally my app is throwing "Automation Error" (this happens just when opening a recordset), and I have no idea whats the matter... the queries are ok. So, can this be a problem with ADO ?

    Thanks!

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    See if this link can shed some light:

    http://support.microsoft.com/kb/q302477/
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •