Start New Discussion within our Software Development Community

I am totally new to, 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 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
        End Try

The question is:

I want to display a MsgBox if there are no data available. Also is there a way to define recordsets?

I appreciate your help.

What is best to use in VB NET in place of the VB6 adodb.recordset?

Google provided some links, in which I found a few tips.

This question has already been answered. Start a new discussion instead.