PDA

View Full Version : Mono, MySQL and ODBC questions


Mickeysofine1972
June 19th, 2006, 04:18 PM
Hi

I've been trying to connect to an existing database using c#/mono that I have accessed previously through PHP script.

when I run the script it says:
Description: Error processing request.

Error Message: HTTP 500.

Stack Trace:

System.Data.Odbc.OdbcException: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
in <0x00547> System.Data.Odbc.OdbcConnection:Open ()

HELP!

Mike

LordHunter317
June 19th, 2006, 05:36 PM
It's because you don't have an ODBC DSN setup for that data source.

But why the hell are you using ODBC in the first place? Use the MySQL ADO.NET driver unless you have a specific reason to use ODBC.

Mickeysofine1972
June 19th, 2006, 05:56 PM
It's because you don't have an ODBC DSN setup for that data source.

But why the hell are you using ODBC in the first place? Use the MySQL ADO.NET driver unless you have a specific reason to use ODBC.

I forgot to mention that I have just started to get into .NET after a pause of about a year and I didn't know/remember that you can use that namespace :lol:

Just for the record... how might one code that again? :)

Mike