TSQL SQL 2000 stored proc cursor

0

I'm new to this board. I have been driving myself crazy trying to find the answer to my problem. I created some TSQL code that executes some dynamic SQL in a cursor within a stored proc. The cursor fetches some data from table x, builds a query based data retrieved in table x, runs the query, and returns data. Works like a charm. When I add an 'insert into table' to capture the results I get an error: NOTE: only errors with SQL 2000 runs great on SQL 2008. The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction. OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

tsql
asked on Stack Overflow May 19, 2010 by Doug

1 Answer

0

You should not be using a cursor for this. My guess would be a comflict with the cursor and the insert into table.

Please post code and the problem you are tyring to solve so that we can help you write it correctly.

answered on Stack Overflow Jul 2, 2010 by kralco626

User contributions licensed under CC BY-SA 3.0