dbTalk Databases Forums  

Cursors and DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Cursors and DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark
 
Posts: n/a

Default Cursors and DTS - 01-24-2006 , 07:53 PM






Hi, I am using a cursor inside a stored procedure to do some complex work on
each row in a table.

Looking at the execution plan everything looks fine (Always worry about
cursors!!) and the Stored Procedure runs fine if I call it via Query
Analyser.

When I go to run the stored procedure from a DTS package (exec
MyStoredProcedure) I receive the following error message..

"The cursor is not open. Could not complete cursor operation because the set
operations have changed since the cursor was declared"

Any ideas how I can get around this??

TIA
Mark



Reply With Quote
  #2  
Old   
Mark
 
Posts: n/a

Default Re: Cursors and DTS - 01-24-2006 , 08:01 PM






Fixed the problem, my own fault, it was a problem with a SET DATEFORMAT
statement which I had (Stupidly) placed after the cursor had been declared.
Placing it before the declaration of the cursor fixed the problem

Mark

"Mark" <mark (AT) Z-Zvolution (DOT) nZt> wrote

Quote:
Hi, I am using a cursor inside a stored procedure to do some complex work
on each row in a table.

Looking at the execution plan everything looks fine (Always worry about
cursors!!) and the Stored Procedure runs fine if I call it via Query
Analyser.

When I go to run the stored procedure from a DTS package (exec
MyStoredProcedure) I receive the following error message..

"The cursor is not open. Could not complete cursor operation because the
set operations have changed since the cursor was declared"

Any ideas how I can get around this??

TIA
Mark




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.