AccessShell
Member
- Joined
- Jun 14, 2016
- Messages
- 21
- Programming Experience
- 10+
I finally figured out how to open a connection to the DB
Now I leave the connection string open and go elsewhere in the code to read data from the DB.
Now I don't know how to actually get the results of the query.
Any help would be appreciated.
Thanks
VB.NET:
dbProvider = "Provider=Microsoft.Jet.OLEDB.4.0;"
dbSource = "Data Source = " & "MyTable.mdb"
con.ConnectionString = dbProvider & dbSource
con.Open()
Now I leave the connection string open and go elsewhere in the code to read data from the DB.
VB.NET:
dim strSQL as string
strSql = "SELECT tblCategories,CategoryName FROM tblCategories"
Now I don't know how to actually get the results of the query.
Any help would be appreciated.
Thanks