Re: Problems with DataSets! - SOLUTION
Finally I have figured out. Here is the solution to connect to a MySQL database using VB.NET
Dim mySQLDS As New DataSet
Dim connString As String = "server=localhost; user id=myUserInMySQL; password=myUsersPassword; database=mysql"
Dim qryMySQL As String = "SELECT user,password FROM user;"
Dim conn As New MySqlConnection
conn.ConnectionString = connString
Dim cmd As MySqlCommand = New MySqlCommand(qryMySQL)
Dim adapt As New MySqlDataAdapter
adapt.SelectCommand = New MySqlCommand(qryMySQL, conn)
adapt.Fill(mySQLDS)
'Code to display the records in a DataGrid
DataGrid1.DataSource = mySQLDS
DataGrid1.DataBind()
Thats all you have to do. Hope it Helps!
Rizwan Kaif
Subject
Written By
Posted
December 05, 2004 07:31AM
December 07, 2004 01:42PM
December 12, 2004 09:32AM
December 21, 2004 11:29AM
Re: Problems with DataSets! - SOLUTION
January 11, 2005 04:01AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.