Friday, June 10, 2011

module

Option Explicit On
Imports System.Data.OleDb
Imports System.Data
Module Module1
    Public con As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "/db1.mdb; Persist Security Info=False;"
    Public cnSQL As OleDb.OleDbConnection
    Public cmSQL As OleDb.OleDbCommand
    Public strSQL As String
    Public objRead As OleDbDataReader
    Public myDA As OleDbDataAdapter
    Public lv As ListViewItem
    Public ds As DataSet
    Public Sub connection_open()
        cnSQL = New OleDbConnection(con)
        cnSQL.Open()
    End Sub

    Public Sub connection_close()
        cnSQL.Close()
        cnSQL.Dispose()
    End Sub
End Module

No comments:

Post a Comment