Suppose that I try to insert some data into a table and if the insertion fails due to some CDBException, will that be logged in to the SQL Profiler logs?

I am using SQL Server MSDE 2000

link|improve this question

33% accept rate
feedback

2 Answers

up vote 0 down vote accepted

SQL Profiler will log. depending on what events you have selected to log, the result of the operation. If this is the underlying cause of the exception then it will be logged.

If the exception is due to a problem other than on the server (e.g. client has lost connectivity) then of course there is no error on the server to log.

link|improve this answer
My exception is this: Could not complete cursor operation because the table schema changed after the cursor was declared – bdhar Mar 24 '10 at 10:39
@Bharanidharan. I would expect that to show up (but will depend on the events selected). OTOH is someone is changing the schema at runtime in a way that interferes with other operations, you have bigger problems. – Richard Mar 25 '10 at 8:35
feedback

You'll need to add events for BatchStarting, StmtStarting, RPCStarting to catch it most likely, but then you should see it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.