Dim datadbAccess As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataBase.mdb;Jet OLEDB:Database Password=XXXXXX;"
Dim connectionDBAccess As New OleDb.OleDbConnection(datadbAccess)
Private Sub open_connectDBAccess()
Try
If connectionDBAccess.State = ConnectionState.Open Then connectionDBAccess.Close()
connectionDBAccess.Open()
Catch ex As Exception
Throw New Exception("การเชื่อมต่อฐานข้อมูลใช้งานไม่ได้ เกิดข้อผิดพลาด Access : " & ex.Message)
End Try
End Sub