Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL and VB .NET

Status
Not open for further replies.

byleth

Programmer
Feb 27, 2004
70
PT
I don't know if this question is in the proper forum, but here it is...

I'm having a problem when trying to connect to a MySQL database, here's the relevant code:


1:Imports System.Data.OleDb

.
.
.

2: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


3: Dim myConnString As String = "Provider=SQLOLEDB;Data Source=db;User Id=abc;Password=xyz; Integrated Security=SSPI;"
4: Dim myConnection As New OleDbConnection(myConnString)

5: myConnection.Open()

.
.
.


At line 5 i get:

"An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll"



I'm using:

MS VB .NET 2002
MS .NET Framework 1.0
MySQL Server 5.0
MySQL ODBC 3.51 Driver

The parameters to the myConnString at line 3 are all correct, and the database itself is working properly
I really don't know what i'm doing wrong here..
Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top