First chance exception?

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

I keep getting the following exception...

A first chance exception of type 'System.Data.SqlClient.SqlException'
occurred in System.Data.dll

Error: EXECUTE permission denied on object 'sp_sdidebug', database 'master',
owner 'dbo'.

why would i be getting that? I have SQL debugging disabled in VS 2005. I and
the user I am logging into the SQL Server with has permissions to do what it
needs to on another database "dbTest"

this is a windows service doing this I am trying to debug. It's running as a
local service. And what is a first chance exception anyways? thanks!
 
Brian,

In VS2003 you can avoid first chance exceptions like this:

1. From the Debug menu, choose Exceptions.

2. From the Exceptions dialog box, highlight Common Language Runtime
Exceptions

3. In the "When the exception is thrown" groupbox, select the Continue radio
button.

I don't know if VS2005 works the same way.

As an example of a first chance exception, consider Visual Basic's IsDate
function. Internally, the function tries to assign the argument to a variable
with a DateTime data type. If an exception is thrown, IsDate returns False,
otherwise it returns True.

The internal exception that gets thrown in the process of IsDate trying to
determine if its argument is a date is a first chance exception. Normally you
would not want to catch that exception, since you really want to get a False
from IsDate, not an exception.

Kerry Moorman
 
Back
Top