472,135 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,135 software developers and data experts.

.Net : How to connect to MySQL using OLE DB Provider?

Expand|Select|Wrap|Line Numbers
  1. Private Connection As New System.Data.OleDb.OleDbConnection
  2. Private Command As New System.Data.OleDb.OleDbCommand
  3.  Connection.ConnectionString = "Provider=MySQLProv;Data Source=localhost;User Id=root;"
  4.  Command.Connection = Connection
  5. Connection.Open()
  6.  

When this code is executed, it shows "MySQLProv is not registered in the local machine"

How to connect Mysql database using OLE DB provider? What should I do for this?
Nov 13 '08 #1
2 10490
Plater
7,872 Expert 4TB
Do you actually have the mysql provider installed on your computer?

It looks like you have the correct connection string, but unless you named your database "localhost", I think you need to fix the database name
http://www.connectionstrings.com/?carrier=mysql
Nov 13 '08 #2
Curtis Rutland
3,256 Expert 2GB
I'm pretty sure it's not a conn string issue, based on his error.

Have you installed the provider? Is it installed by default when you install MySql? Do you have MySql on your machine?

I've never used MySql, but I've used other DBMSs that will install their .net connectors, OleDB providers, and ODBC drivers when you install their client tools. For example, when you install IBM's Client Access software, it installs the IBMDA400 provider on your machine.

Search around for installing the provider. Also look for the native connector, as that will be easier to use.
Nov 13 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by Marcus | last post: by
3 posts views Thread by hkappleorange | last post: by
1 post views Thread by Alex Hardin | last post: by
14 posts views Thread by Frank Rizzo | last post: by
3 posts views Thread by MSK | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.