Dim conn1 As MySqlConnection = New MySqlConnection("Database=DBName; Data Source=HostName; User Id=Account; Password=Password; CharSet=big5;")
Dim DBstr1 As String = "Select * From ABC Order by ID"
Dim DA1 As MySqlDataAdapter = New MySqlDataAdapter(DBstr1, conn1)
Dim DS1 As DataSet = New DataSet
Try
conn1.Open()
DA1.Fill(DS1, "Data")
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn1.Close()
End Try
沒有留言:
張貼留言