Public Class clsConnecetion
Public ConMy As MySqlConnection = New MySqlConnection
'Dim Hostname As String = "172.00.00.000"
'Dim DBName As String = "XXX"
'Dim SID As String = "admin"
'Dim Password As String = "1234567890"
Public Sub ConnectOpen()
ConMy.Close()
Try
With ConMy
If .State = ConnectionState.Open Then .Close()
.ConnectionString = "Data Source=" & Hostname & ";Database=" & DBName & ";User ID=" & SID & ";Password=" & Password & ";CharSet=tis620"
.Open()
End With
Catch ex As Exception
End Try
End Sub
Public Sub ConnectClose()
Try
ConMy.Close()
Catch ex As Exception
End Try
End Sub
End Class