473,387 Members | 1,745 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,387 software developers and data experts.

Problem connection to MySQL using .net

Hi,

I am trying to connect to a MySQL database, using the .Net framework.

I installed the newest MyODCB (3.51) and the .Net ODBC drivers from
Microsoft.

I made a System DSN using the driver, and i get it to connect - so far
so good.

But if i try making a new connection i my code using the sample
connectionstring from MySQL, i get an Exception :(

"An OLE DB Provider was not specified in the ConnectionString. An
example would be, 'Provider=SQLOLEDB;'."

What i try is:

Return New OleDb.OleDbCommand("DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=bigshop;UID=root ;PASSWORD=;OPTION=3;")

- Should I use an other connectionstring?
Jul 19 '05 #1
2 5516
heya -
oledb is not odbc - suggest you shift to using odbc directly [if you can] or
layer your odbc driver to be properly 'called' from the oledb interface.

hth - mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
mySql / VFP / MS-SQL
"Soren Bendtsen" <sb****@worldonline.dk> wrote in message
news:29**************************@posting.google.c om...
Hi,

I am trying to connect to a MySQL database, using the .Net framework.

I installed the newest MyODCB (3.51) and the .Net ODBC drivers from
Microsoft.

I made a System DSN using the driver, and i get it to connect - so far
so good.

But if i try making a new connection i my code using the sample
connectionstring from MySQL, i get an Exception :(

"An OLE DB Provider was not specified in the ConnectionString. An
example would be, 'Provider=SQLOLEDB;'."

What i try is:

Return New OleDb.OleDbCommand("DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=bigshop;UID=root ;PASSWORD=;OPTION=3;")

- Should I use an other connectionstring?

Jul 19 '05 #2
heya -
oledb is not odbc - suggest you shift to using odbc directly [if you can] or
layer your odbc driver to be properly 'called' from the oledb interface.

hth - mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex********@efgroup.net
mySql / VFP / MS-SQL
"Soren Bendtsen" <sb****@worldonline.dk> wrote in message
news:29**************************@posting.google.c om...
Hi,

I am trying to connect to a MySQL database, using the .Net framework.

I installed the newest MyODCB (3.51) and the .Net ODBC drivers from
Microsoft.

I made a System DSN using the driver, and i get it to connect - so far
so good.

But if i try making a new connection i my code using the sample
connectionstring from MySQL, i get an Exception :(

"An OLE DB Provider was not specified in the ConnectionString. An
example would be, 'Provider=SQLOLEDB;'."

What i try is:

Return New OleDb.OleDbCommand("DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=bigshop;UID=root ;PASSWORD=;OPTION=3;")

- Should I use an other connectionstring?

Jul 19 '05 #3

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

Similar topics

0
by: sridhar nagabhurshana | last post by:
hello I am trying to connect to mysql database using connector/J jdbc driver this is my code import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException;
1
by: Chinmay Shah | last post by:
hi, when i try to call the mysql_init function it is not getting initilized properly. can someone help me thanks chinmay
6
by: Ian Davies | last post by:
Hello I have the following code to connect to mySQL database from VB6 ******************************************** Private Sub Form_Load() Dim conn As ADODB.Connection Set conn = New...
4
by: Ian Davies | last post by:
Hello all The following code allows me to connect to a local MySQL database on my pc from a VB6 project. **************************************************************************** ** Dim...
1
by: James | last post by:
Hey everyone, I have a really obscure but impassable problem with a reasonably simple piece of php/PEAR DB/MySQL code When calling several stored procs the first call succeeds, but subsequent...
0
by: Daniel Crespo | last post by:
Hi to all, I'm using adodb for accessing mysql and postgres. My problem relies on the mysql access. Sometimes, when I try to execute a query (using ExecTrans method below), I get this error:...
31
by: Extremest | last post by:
I have a loop that is set to run as long as the arraylist is > 0. at the beginning of this loop I grab the first object and then remove it. I then go into another loop that checks to see if there...
10
by: sssk28 | last post by:
i have installed fedora core 6 and i am getting following error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this...
2
by: dmstn | last post by:
Hey! I've got a little problem. I have to make a web site for a university essay. I curently have to create a search engine. Users can enter a hotel name in a search bar and results have to appear in...
1
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning:...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.