I am going to kill mysql

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi

I did the following in an effort to connect to mysql using VB.net on a
windows XP pro machine.
I made reference to and used the import statement as follows :

Imports Microsoft.Data.Odbc

I then created my connection with the following :

Dim objConnection As New
OleDbConnection("driver={MySql};uid=root;pwd=;server=127.0.0.1;database=dbnr
gplc;OPTION=17923")

but I keep getting the folowing error :

An OLE DB Provider was not specified in the ConnectionString. An example
would be, 'Provider=SQLOLEDB;'.
Any ideas as to where I am going wrong ??

Thanks for the help so far.
 
Create a file with the extension .udl. Try to open it. It will open with
the little "connection wizard" (I can't remember what the real name of it
is.) Set up all your connection information, test the connection, and save.

Then open the UDL file with notepad and that will be the connection string
to use.

HTH,

bill
 
OLE DB and ODBC are 2 different technologies. You imported the Odbc library,
but used the Oledb library in your code. If you need to use ODBC, use the
ODBC library classes.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.
 
Of course there is. You just use the ODBC library classes
(System.Data.Odbc), not the OleDb (System.Data.Oledb) classes.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.
 
Back
Top