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
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.
http://www.connectionstrings.com
hth
Eric
"Roger Cantillo" <rog...@axiomsw.com> wrote in message
news:%23YQXa9M...@TK2MSFTNGP12.phx.gbl...
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
"Roger Cantillo" <rog...@axiomsw.com> wrote in message
news:%23YQXa9M...@TK2MSFTNGP12.phx.gbl...
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>
> MySQLNet
> <http://sourceforge.net/projects/mysqlnet>
>
--
> Herfried K. Wagner [MVP]
> <http://www.mvps.org/dotnet>
Cor
ACK, there is "only" a MySQL driver for ADO.NET available...
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