473,395 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 10475
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 u guys have any idea? config.php <html>...
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 me the same error (scroll further down to see it)...
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 the Java program are on the same Win 98 SE...
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... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
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 pc. >From my pc, I can telnet to the sql...
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, through a servlet, when the servlet is on the same...
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 browser. With my set up I got a user root with a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.