Re: mySQL connection problem
- From: telconstar99@xxxxxxxxxxx
- Date: 6 Nov 2005 07:29:05 -0800
Oh, I forgot to note. In my Administrator Tools>Data Sources (ODBC), I
named the connection to the database "CSDatabaseServer". I tested the
connection and it says it successfully connected. I know this is true
because it lists my different databases and allows me to choose a
default one.
Anyway, I also tried setting my connectString="DSN=CSDatabaseServer".
That did not work either however.
I also threw all of this stuff into a try/catch block like so:
try
{
OdbcConnection connection = new
OdbcConnection(connectString);
}
catch (System.Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
Console.WriteLine("ERROR");
// Wait for key
Console.Out.WriteLine("Press a key to exit");
Console.Read();
}
It would never make it into the catch but always made it to finally. So
how does it get to the finally block without throwing an exception?
Any help would be appreciated, thanks guys.
.
- Follow-Ups:
- Re: mySQL connection problem
- From: JuanCri
- Re: mySQL connection problem
- Prev by Date: MSIL-IDE
- Next by Date: Creating controls at runtime
- Previous by thread: MSIL-IDE
- Next by thread: Re: mySQL connection problem
- Index(es):
Relevant Pages
|
Loading