Hallo, ich m�chte eine MySQL Datenbank mittels MyODBC Treiber ansprechen,
System DSN usw. ist auch alles richtig eingerichtet (im Server Explorer von
VS.NET funktioniert die Verbindung auch wunderbar).

Wenn ich dann aber folgenden Code (aus der VS.NET C# Doku) benutze bekomme
ich eine Fehlermeldung, das der OLE Provider dies nicht unterst�tzt. Jetzt
steh ich nat�rlich wie'n Ochs vorm Berg.

Source:

[...]

string myConnectionString = string.Empty;
if(myConnectionString == "")
{
myConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data
Source=Jahrgang 2003;Extended Properties=\"Jahrgang 2003MySQL ODBC 3.51
Driver;DATABASE=jahrgang2003;SERVER=192.168.0.6;UID=user;PASSWORD=password;\
"";
}
OleDbConnection myConnection = new OleDbConnection(myConnectionString);
string myInsertQuery = "SELECT vorname,nachname FROM y2k3_userdetail";
OleDbCommand myCommand = new OleDbCommand(myInsertQuery);
myCommand.Connection = myConnection;
myConnection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();

[...]

Nun die Fehlermeldung:

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: The .Net Data OLE DB
Provider(System.Data.OleDb) does not support the MSDASQL Provider, Microsoft
OLE DB Provider for ODBC Drivers.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.


| [aspdedotnet] als [email protected] subscribed
| http://www.dotnetgerman.com/archiv/aspdedotnet/ = Listenarchiv
| Sie k�nnen sich unter folgender URL an- und abmelden:
| http://www.dotnetgerman.com/listen/aspDEdotnet.asp

Antwort per Email an