472,342 Members | 1,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Cannot connect to MySQL using VB.NET 1.1

I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database.

I've done the following:

1) Create a DSN for MyODBC.
2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data
Source=test; UID=test; PWD=pwd; OPTION=3
When I run my app, I get this error: An OLE DB Provider was not specified in
the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

I tried changing the connection string to Provider=MySQL ODBC 3.51 Driver;
Server=localhost; Data Source=test; UID=test; PWD=pwd; OPTION=3 (Instead of
Driver, I change it to Provider - most of the examples I found on the net
including those from MySQL AB uses Driver).

Now I get this error: The 'MySQL ODBC 3.51 Driver' provider is not
registered on the local machine.

Can someone please help?

Tks
Young

Feb 23 '06 #1
2 10357
zMisc wrote:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database.

I've done the following:

1) Create a DSN for MyODBC.
2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data
Source=test; UID=test; PWD=pwd; OPTION=3
When I run my app, I get this error: An OLE DB Provider was not specified in
the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

I tried changing the connection string to Provider=MySQL ODBC 3.51 Driver;
Server=localhost; Data Source=test; UID=test; PWD=pwd; OPTION=3 (Instead of
Driver, I change it to Provider - most of the examples I found on the net
including those from MySQL AB uses Driver).

Now I get this error: The 'MySQL ODBC 3.51 Driver' provider is not
registered on the local machine.

Can someone please help?

Tks
Young

http://dev.mysql.com/doc/refman/5.0/...-op-vb-cp.html has an excellent
example of how to do this:

'MyODBC 3.51 connection string
Dim MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;" & _
"DATABASE=test;" & _
"UID=venu;" & _
"PASSWORD=venu;" & _
"OPTION=3;"

'Connection
Dim MyConnection As New OdbcConnection(MyConString)
MyConnection.Open()

Note the quotes/braces around the DRIVER section

--
Michael Austin.
DBA Consultant
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
Feb 23 '06 #2
I just realised I am trying to use OLE DB to connect to MySQL.

Is it possible to connect to MySQL OLE DB? Where can I download MyOLEDB?

Tks

"Michael Austin" <ma*****@firstdbasource.com> wrote in message
news:XM******************@newssvr25.news.prodigy.n et...
zMisc wrote:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database.

I've done the following:

1) Create a DSN for MyODBC.
2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data
Source=test; UID=test; PWD=pwd; OPTION=3
When I run my app, I get this error: An OLE DB Provider was not specified
in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

I tried changing the connection string to Provider=MySQL ODBC 3.51
Driver; Server=localhost; Data Source=test; UID=test; PWD=pwd; OPTION=3
(Instead of Driver, I change it to Provider - most of the examples I
found on the net including those from MySQL AB uses Driver).

Now I get this error: The 'MySQL ODBC 3.51 Driver' provider is not
registered on the local machine.

Can someone please help?

Tks
Young

http://dev.mysql.com/doc/refman/5.0/...-op-vb-cp.html has an
excellent example of how to do this:

'MyODBC 3.51 connection string
Dim MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" &
_
"SERVER=localhost;" & _
"DATABASE=test;" & _
"UID=venu;" & _
"PASSWORD=venu;" & _
"OPTION=3;"

'Connection
Dim MyConnection As New OdbcConnection(MyConString)
MyConnection.Open()

Note the quotes/braces around the DRIVER section

--
Michael Austin.
DBA Consultant
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)

Feb 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Krista | last post by:
Hi, I hope you guys can help me out~~~ when I run it localhost/config.php, it cannot display any message such as connect successfully or failed. Do...
4
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
0
by: Kyle Goetz | last post by:
hey, i'm new to mySQL...this meaning that i have tried ~10000 times to install it and get it working over the past few weeks...and it always gives...
6
by: Jeff Sandler | last post by:
I have a database I created in mySQL. I've been entering data every day into the database using a Java application that I wrote. The database and...
5
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands......
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 ...
5
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my...
5
by: Ike | last post by:
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote computer. I can connect fine via php. I cann connect fine via Java,...
3
by: FNA access | last post by:
Hello all, I am relitivley new to mySQL. I started by downloading from the mySQL site. I then downloaded mySQL administrator and mySQL Query...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.