Private Shared Function GetConnectionString() As String
Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\...\Common\C1NWind.mdb;"
Return String.Format(conn)
End Function
Private Function GetDataSource(ByVal connectionString As String) As DataTable
'set up connection string
Dim conn As String = GetConnectionString()
'set up SQL statement
Dim rs As String = connectionString
'retrieve data into DataSet
Dim da As OleDbDataAdapter = New OleDbDataAdapter(rs, conn)
Dim ds As DataSet = New DataSet()
da.Fill(ds)
'return data table
Return ds.Tables(0)
End Function