3 messages in com.mysql.lists.win32OleDbConnection problem (C#)| From | Sent On | Attachments |
|---|---|---|
| Development | 25 Aug 2003 09:42 | |
| Amr Mohamed | 25 Aug 2003 21:16 | |
| Amr Mohamed | 25 Aug 2003 21:49 |
| Subject: | OleDbConnection problem (C#)![]() |
|---|---|
| From: | Development (de...@anthonynassar.com) |
| Date: | 08/25/2003 09:42:44 AM |
| List: | com.mysql.lists.win32 |
Here's the code from MySQL's documentation:
//Connection string for Connector/ODBC 3.51 string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=localhost;" + "DATABASE=test;" + "UID=venu;" + "PASSWORD=venu;" + "OPTION=3";
//Connect to MySQL using Connector/ODBC OdbcConnection MyConnection = new OdbcConnection(MyConString); MyConnection.Open();
I do not understand the relation between this sample and my particular
configuration. Are the curly braces metacharacters, for example? In any case,
when I try to execute this code, changing the UID and PASSWORD appropriately, I
get the following exception: "An unhandled exception of type
'System.ArgumentException' occurred in system.data.dll. Additional information:
An OLE DB Provider was not specified in the ConnectionString. An example would
be, 'Provider=SQLOLEDB;'." Who is my "provider"?!? All the C# examples posted on
the Web have something like "PROVIDER=[insert your provider]"; not helpful! My
ODBC Data Source Administrator describes my sole User DSN as "myodbc3-test."
"PROVIDER=myodbc3-test" doesn't work, nor does "PROVIDER=mysql;DATA
SOURCE=myodbc3-test;" Can somebody untangle this? When I click "Test Data
Source" in the ODBC Data Source Administrator dialog, I'm informed, "Data source
'myodbc3-test' connected successfully to 'mysqld-4.1.0-alpha-max-nt'"; does that
have any significance here?
Tony Nassar




