I am totally new to vb.net, still I am planning to try it for a project, in which there will be standalone machine using an access database to query and update different tables.
While in VB6 I was able to define recordsets using Microsoft.jet.oledb.4.0, in VB.net I have become a little confused.
I plan to define a global connection to the access database:
Dim TheConnection As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0; data source=|DataDirectory|\office.mdb;Persist Security Info=True;Jet OLEDB:Database Password=1234")
Depending on what the user has selected, a sql command is created, e.g.
Dim SQL_CUSTOMERS As OleDbCommand = New OleDbCommand("SELECT * FROM CUSTOMERS;", TheConnection)
A list of customers can be filled as follows:
Dim reader As OleDbDataReader
reader = SQL_CUSTOMERS.ExecuteReader()
Do While reader.Read()
Catch ex As Exception
The question is:
I want to display a MsgBox if there are no data available. Also is there a way to define recordsets?