Jump to content


Photo
- - - - -

SQL Server and Cursors


4 replies to this topic

#1 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 12 March 2007 - 12:57 PM

Running 5.5r411 on Win2003 Server with SQL Server 2005.

We keep getting a 366 error (A cursor with the name 'XXXXXXX' does not exist) when adding to a data file.

I have implicit transactions set and auto close of cursors on commit has been disabled.

Anyone got any bright ideas?

#2 Mike Schoen

Mike Schoen

    Expert

  • Members
  • PipPipPipPip
  • 198 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 12 March 2007 - 02:53 PM

Neil,

The only suggestion I have is that you chech the functions called for commits, and try commenting them out in a test environment to confirm that the cursors really dont get closed.

We ran into this with sql 2000, and had to restructure a few functions to deal with losing cursors on commit.

We are doing testing on sql 2005 as well, to confirm that we are able to work with it despite its "not supported with release 5.5" status.

If we run into anything like this and can solve it, I will let you know.

Mike

#3 fatboy996

fatboy996

    Newbie

  • Members
  • Pip
  • 5 posts
  • Gender:Male

Posted 12 March 2007 - 10:47 PM

I suggest you put SQL_TRANSACTION_ERROR=Y in your pro4.ini (under the environment section) and then re-run your functions, this will then generate an error if you are commiting data in the wrong place which should then help you narrow down the error.

#4 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 13 March 2007 - 05:37 AM

Neil,

The only suggestion I have is that you chech the functions called for commits, and try commenting them out in a test environment to confirm that the cursors really dont get closed.

We ran into this with sql 2000, and had to restructure a few functions to deal with losing cursors on commit.

We are doing testing on sql 2005 as well, to confirm that we are able to work with it despite its "not supported with release 5.5" status.

If we run into anything like this and can solve it, I will let you know.

Mike


Thanks Mike. Will scratch around a bit. Strange thing is that this set of boots was ported from a set of Oracle boots, where the only change has been the file defs. And it works 100% under Oracle :o

#5 Mike Schoen

Mike Schoen

    Expert

  • Members
  • PipPipPipPip
  • 198 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 13 March 2007 - 01:06 PM

Neil,

The only suggestion I have is that you chech the functions called for commits, and try commenting them out in a test environment to confirm that the cursors really dont get closed.

We ran into this with sql 2000, and had to restructure a few functions to deal with losing cursors on commit.

We are doing testing on sql 2005 as well, to confirm that we are able to work with it despite its "not supported with release 5.5" status.

If we run into anything like this and can solve it, I will let you know.

Mike


Thanks Mike. Will scratch around a bit. Strange thing is that this set of boots was ported from a set of Oracle boots, where the only change has been the file defs. And it works 100% under Oracle :o


We had the exact same surprise when we added mssql support to our application.
That and sub-selects caused a few rewrites :(



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users