473,320 Members | 2,202 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,320 software developers and data experts.

MySQL Connection

Hi:
I'm trying to make a connection to a MySQL database, but I keep getting this
error:

System.ArgumentException: Keyword not supported: 'provider'.

This is the code that fails:

objConn = New SqlConnection("Provider=MSDASQL; DRIVER={MySQL ODBC 3.51
Driver}; Server=localhost; UID=root; PWD=; database=helloworld;
Option=16387;PORT=3306;STMT=;")

Any ideas?
Roger
Nov 20 '05 #1
9 7536
"Roger Cantillo" <ro****@axiomsw.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi:
I'm trying to make a connection to a MySQL database, but I keep getting this error:

System.ArgumentException: Keyword not supported: 'provider'.

This is the code that fails:

objConn = New SqlConnection("Provider=MSDASQL; DRIVER={MySQL ODBC 3.51
Driver}; Server=localhost; UID=root; PWD=; database=helloworld;
Option=16387;PORT=3306;STMT=;")

Any ideas?


Many problems here:

1. You can't use the SqlConnection object to connect to an ODBC database.
That object is a SQL Server specific object and can only be used to go to a
SQL Server database.
2. You can't use the ODBC driver directly as an OleDb provider. There is an
OleDb driver for MySQL - you need that, or the native .NET driver.

http://www.mysql.com/articles/dotnet/

R.
Nov 20 '05 #2
Richard helped you already, but I thought I'd pass on this link.

http://www.connectionstrings.com

hth
Eric
"Roger Cantillo" <ro****@axiomsw.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi:
I'm trying to make a connection to a MySQL database, but I keep getting this error:

System.ArgumentException: Keyword not supported: 'provider'.

This is the code that fails:

objConn = New SqlConnection("Provider=MSDASQL; DRIVER={MySQL ODBC 3.51
Driver}; Server=localhost; UID=root; PWD=; database=helloworld;
Option=16387;PORT=3306;STMT=;")

Any ideas?
Roger

Nov 20 '05 #3
"Roger Cantillo" <ro****@axiomsw.com> schrieb
Hi:
I'm trying to make a connection to a MySQL database, but I keep
getting this error:

System.ArgumentException: Keyword not supported: 'provider'.

This is the code that fails:

objConn = New SqlConnection("Provider=MSDASQL; DRIVER={MySQL ODBC
3.51 Driver}; Server=localhost; UID=root; PWD=;
database=helloworld; Option=16387;PORT=3306;STMT=;")

Use an OleDBConnection instead.

See also: http://www.connectionstrings.com/

Group for ADO.NET related questions:
microsoft.public.dotnet.framework.adonet

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
sqlconnection is for MS-SQL Server only... use OleDB connection
"Roger Cantillo" <ro****@axiomsw.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi:
I'm trying to make a connection to a MySQL database, but I keep getting this error:

System.ArgumentException: Keyword not supported: 'provider'.

This is the code that fails:

objConn = New SqlConnection("Provider=MSDASQL; DRIVER={MySQL ODBC 3.51
Driver}; Server=localhost; UID=root; PWD=; database=helloworld;
Option=16387;PORT=3306;STMT=;")

Any ideas?
Roger

Nov 20 '05 #5
* "Roger Cantillo" <ro****@axiomsw.com> scripsit:
I'm trying to make a connection to a MySQL database, but I keep getting this
error:

System.ArgumentException: Keyword not supported: 'provider'.

This is the code that fails:

objConn = New SqlConnection("Provider=MSDASQL; DRIVER={MySQL ODBC 3.51
Driver}; Server=localhost; UID=root; PWD=; database=helloworld;
Option=16387;PORT=3306;STMT=;")


Maybe it's really "not supported", but have a look at
<http://www.connectionstrings.com>. Maybe you want to use an other data
provider:

<http://www.mysql.com/articles/dotnet/#ADO.NET>

dbProvider
<http://www.einfodesigns.com/products.aspx>

MySQLNet
<http://sourceforge.net/projects/mysqlnet>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Cor
I tried that last link but there was very few about MySQL
MySQLNet
<http://sourceforge.net/projects/mysqlnet>
-- Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Cor
Nov 20 '05 #7
* "Cor" <no*@non.com> scripsit:
I tried that last link but there was very few about MySQL
MySQLNet
<http://sourceforge.net/projects/mysqlnet>


ACK, there is "only" a MySQL driver for ADO.NET available...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8
Cor
Hi Herfried,

That last link was
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


:-)) and I knew it was not there but it was so thight on the others that you
could think it was.

Cor
Nov 20 '05 #9
* "Cor" <no*@non.com> scripsit:
That last link was
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


:-)) and I knew it was not there but it was so thight on the others that you
could think it was.


Oh, nice joke!

:-)

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #10

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

Similar topics

0
by: Robert Mazur | last post by:
MySQL 5.0 alpha (binary install) on Solaris 9 -or- RedHat 8.0 mysql-connector-java-3.0.8-stable ----------------------- Is there something different going on with JDBC and the alpha version...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
1
by: zMisc | last post by:
I am looking at using MySQL in my application (currently works with Access and SQL Server 2000). Is it possible to access MySQL database using ADO? What is the connection string for this? ...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
7
by: Ike | last post by:
Let's say I have a MySQL 4.12 database, opened to the internet on 111.111.111.111 allowing all incoming and outgoing ports. I have a username and password setup, which CAN connect to this database,...
5
oll3i
by: oll3i | last post by:
my librarybean package library.ejb; import java.sql.*; import javax.ejb.*; import library.common.*; @Stateless @Remote
3
by: tulika dutta | last post by:
after 8 hrs my MySQL connection with JDBC gets time out. It gives the error java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.