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" <maustin@firstdbasource.com> wrote in message
news:XMaLf.34128$Jd.21127@newssvr25.news.prodigy.n et...[color=blue]
> zMisc wrote:
>[color=green]
>> 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
>>
>>
>>[/color]
>
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
> :)[/color]