MySQL Provider not registered

  • Thread starter Thread starter Steven Blair
  • Start date Start date
S

Steven Blair

Hi,

Trying to make a connection and getting the following error:

"The 'MySQLProv' provider is not registered on the local machine."

MySQl is installed and working, I also went to ODBC settings and created a
new System Data Source for MySQl. (MySQL ODBC 3.51 Driver)

Is it my responsibilty to set the provider name, or is this held somewhere
on the system ?
 
Hi,

I am not a MySQL expert, but you might be using OLEDB provider for MySQL,
not an ODBC one. If this is the case, ensure the OLEDB provider for MySQL is
installed properly.


If you could post your connection string (without username and password, of
course) and code that establishes the connection, it would be easier to
pinpoint the possible reason of the error.
 
Hi,

Trying to make a connection and getting the following error:

"The 'MySQLProv' provider is not registered on the local machine."

MySQl is installed and working, I also went to ODBC settings and created a
new System Data Source for MySQl. (MySQL ODBC 3.51 Driver)

Is it my responsibilty to set the provider name, or is this held somewhere
on the system ?

For your connection string, just use the dsn name for it. ie:
OdbcConnection myConn=new OdbcConnection("DSN=myDSNname");

Austin
 
Here is what I am doing:

string source = "Provider=MySQLProv;" +

"Data Source=mySQLDB;" +

"User Id=myUsername;" +

"Password=myPassword";

conn.Open();
 
Here is what I am doing:

string source = "Provider=MySQLProv;" +

"Data Source=mySQLDB;" +

"User Id=myUsername;" +

"Password=myPassword";

conn.Open();

No need for that. Just set up an Odbc User DataSource. Control Panel
Administrative Tools > Data Sources. Click Add. Select MySQL ODBC
3.51 Driver and click Finish. For the Data Source Name, pick
something that describes the actual database (say "MyFirstDB"). Be
sure to click "Test Data Source" to make sure all of your Parameters
are correct. Then, in your code, all you need is just:

OdbcConnection myConn=new OdbcConnection("DSN=MyFirstDB");
myConn.Open();

Austin
 
Yes working now using OdbcConnection object.

This originally didnt work, but done a little investigation and realised I
need to install ODBC.net.
So, downloaded, instalkled, and added a reference and Open works fine :)

Thanx for the help, much appreciated.
 
Back
Top