Google can help you without any doubt,and because CP is one of the most important sites that google use to bring solutions on programming to,i have use it to give you some codes that can help you.
01 Imports System.Data.OleDb
02 Public Class DatabaseConnection
03 Private CommonConnection As OleDbConnection
04 Private CommaonDataAdapter As OleDbDataAdapter
05 Private CommonCommand As OleDbCommand
06 Private CommonDataSet As DataSet
07
08 Public Sub New()
09 CommonConnection = New OleDbConnection("provider=MicroSoft.jet.OLEDDB.4.0;" & "Data Source=..\db1.mdb;" & "persist Security Info=false")
10 CommonCommand = New OleDbCommand
11 CommonCommand.Connection = CommonConnection
12 CommonDataSet = New DataSet
13 End Sub
14 Protected ReadOnly Property p_CommonConnection() As OleDbConnection
15 Get
16 Return CommonConnection
17 End Get
18 End Property
19 Protected Property p_CommonDataAdapter() As OleDbDataAdapter
20 Get
21 Return CommaonDataAdapter
22 End Get
23 Set(ByVal Value As OleDbDataAdapter)
24 CommaonDataAdapter = Value
25 End Set
26 End Property
27 Protected ReadOnly Property p_CommonCommand() As OleDbCommand
28 Get
29 Return CommonCommand
30 End Get
31 End Property
32 Protected Property p_CommonDataSet() As DataSet
33 Get
34 Return CommonDataSet
35 End Get
36 Set(ByVal Value As DataSet)
37 CommonDataSet = Value
38 End Set
39 End Property
40
41 End Class