Re: mySQL connection problem



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.

.



Relevant Pages

  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... much rather write stored procedures and use server side cursors. ... local database, it is vital that I get the information to a central server. ... Once the connection is restored, ...
    (microsoft.public.data.ado)
  • Re: ESQL/C documentation nightmare
    ... documentation about explicit and implicit connections. ... CONNECTION connection statements for new applications of Version 6.0 ... the SQL database statements (such as ...
    (comp.databases.informix)

Loading