First chance exception?

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!
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top