Imports System.Data
Imports System.Data.OleDb
Module pos
    Public cnn As New OleDb.OleDbConnection
    Public Sub connectdatabase()
        Dim str As String
        str = "provider=Microsoft.ACE.OLEDB.12.0;data source= D:\Project\WindowsApp1\Database.accdb;"
        If cnn.State = ConnectionState.Open Then cnn.Close()
        cnn.ConnectionString = str
        cnn.Open()
    End Sub
End Module
