Hi All..
I'm trying to create an App in VB.Net that connects to MySQL for its data. In VB6, I can do this no problems. But in VB.net, nothing but problems.
Am I missing something??
Dim connString As String = "Driver={MySQL ODBC 3.51 Driver};" & _
"SERVER=XXXXXX.org;" & _
"DATABASE=test;" & _
"UID=XXXXXX;" & _
"PASSWORD=XXXX;" & _
"OPTION=16427;"
Dim myConnection As OleDbConnection = New OleDbConnection()
myConnection.ConnectionString = connString
' create a data adapter
Dim da As OleDbDataAdapter = New OleDbDataAdapter("Select * from Postcatc", myConnection)
' create a new dataset
Dim ds As DataSet = New DataSet()
' fill dataset
da.Fill(ds, "Postcatc"
' write dataset contents to an xml file by calling WriteXml method
' Attach DataSet to DataGrid
DataGrid1.DataSource = ds.DefaultViewManager
I'm trying to create an App in VB.Net that connects to MySQL for its data. In VB6, I can do this no problems. But in VB.net, nothing but problems.
Am I missing something??
Dim connString As String = "Driver={MySQL ODBC 3.51 Driver};" & _
"SERVER=XXXXXX.org;" & _
"DATABASE=test;" & _
"UID=XXXXXX;" & _
"PASSWORD=XXXX;" & _
"OPTION=16427;"
Dim myConnection As OleDbConnection = New OleDbConnection()
myConnection.ConnectionString = connString
' create a data adapter
Dim da As OleDbDataAdapter = New OleDbDataAdapter("Select * from Postcatc", myConnection)
' create a new dataset
Dim ds As DataSet = New DataSet()
' fill dataset
da.Fill(ds, "Postcatc"
' write dataset contents to an xml file by calling WriteXml method
' Attach DataSet to DataGrid
DataGrid1.DataSource = ds.DefaultViewManager