Updates to table through enterprise manager roll back without warning

  • Thread starter Thread starter Mark Neilson
  • Start date Start date
M

Mark Neilson

I have a table with a trigger on it that includes a cursor to iterate
through the inserted rows

I can get a stored proc to make the trigger logic work
but any updates through enterprise manager - table - show all rows roll back
without any warning. Same behaviour in ms access

Setting a trace on the table doesn't give me the information as to why it is
rolling back. The cursor is being opened and fetched into with
sp_cursorfetch

Is there a way of stepping through the trigger when doing updates in EM
directly?
 
MN> Is there a way of stepping through the trigger when doing updates in
MN> EM directly?

First, check triggers on the table, as it hardly can be any other reason.

If it's not enough, run query analyzer, open objects tree, find the s.p.
that updates the table, and debug it. You may have to install some debugging
dll's on the server.

Or you can use Profiler and enable tracing of all SQL events.

Vadim
 
It appears to be the cursor in the trigger that is causing the problem when
being called from anything other than T-SQL.

Using Access, it appears that these will roll back the data when called
using anything other than transact SQL.

If I update the data using a stored proc then everything is fine - the
update works.

..
 
Post the code. That would help us determine what might be done.

Also, run profiler and turn on all of the statement tracing. This will show
you what is being executed.

Lastly, add some inserts into a permanent table that can tell you where the
error is occurring.

--
----------------------------------------------------------------------------
-----------
Louis Davidson ([email protected])
Compass Technology Management

Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266

Note: Please reply to the newsgroups only unless you are
interested in consulting services. All other replies will be ignored :)
 
Back
Top