Public Class F_ORDER
Dim connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Database.mdb"
Dim Conn As OleDbConnection
Dim Comm As OleDbCommand
Public DA As OleDbDataAdapter
Public DT As DataTable
Dim sql As String = ""
Private Sub RunSQL(ByVal sql As String)
Conn = New OleDb.OleDbConnection(connStr)
Comm = New OleDb.OleDbCommand(sql, Conn)
Conn.Open()
Comm.ExecuteNonQuery()
Conn.Close()
End Sub
Private Function SelectSQL(ByVal sql As String) As DataTable
Conn = New OleDbConnection(connStr)
DA = New OleDbDataAdapter(sql, Conn)
DT = New DataTable
DA.Fill(DT)
Return DT
End Function