Public strcon As String = "server=ชื่อ Server ;initial catalog = ชื่อ database ;user = ชื่อ user ;password=password "
Public con As New SqlConnection(strcon)
Public cm As New SqlCommand
Public dr As SqlDataReader
Public da As New SqlDataAdapter
Public ds As New DataSet
Public tr As SqlTransaction
Public sb As New StringBuilder
Public Sub consql()
With con
If .State = Data.ConnectionState.Open Then .Close()
.Open()
End With
End Sub