Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception when database not found
Message
 
To
23/06/2005 05:12:19
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01025732
Message ID:
01026838
Views:
13
Andrew,

>I get this unhandled exception when I use a non-existing database in the connection string :
>
>An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll. Additional information: System error.
>
>The correct exeception* is caught in the catch part of the Main() method but the new unhandeled exception is thrown when the MM framework tries to create a new ExceptionForm (Line 51 of Main.cs : mmExceptionForm ExceptForm = new mmExceptionForm(e.Message, e.StackTrace))
>
>Not sure what to do with this as there is no stack trace, has anyone else had this problem?

>* SQLException with message : "Cannot open database requested in login 'fdsafs'. Login fails.\r\nLogin failed for user 'someusername'."

The error message you're seeing is correct, but it should still display the Exception form. I recommend setting a breakpoint in mmExceptionForm's constructor to see why the form cannnot be displayed.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform