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


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.

  • 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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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