Visual Basic and ADO

You can access the OLE DB provider using Microsoft ActiveX Data Objects (ADO). This approach is more generic than using the Historian SDK.

Visual Basic supports asynchronous (ASYNC) connections. You can open multiple ADO connections to the same data source from within a Visual Basic program. You are limited to one server per connection, and one username and password. A different user can make another connection to the same server, however, by using a different username and password.

We recommend that you use client-side cursors instead of server-side cursors in Visual Basic. If you use a server-side cursor, the RowCount property on the recordset object will always be -1 instead of the actual row count.

Table 1. Visual Basic and ADO Samples
File Name Description
SimpleADOExample.vbp Visual Basic project file that uses a simple ADO example with a connect string.
modSimpleADOExample.bas File that is part of the SimpleADOExample.vbp project file.
iholedb_databoundgrid.vbp Visual Basic project file that displays a data-bound grid example that fetches data from the ihRawData table.
frmMain.frm File that is part of the iholedb_databoundgrid.vbp project file.
frmMain.frx File that is part of the iholedb_databoundgrid.vbp project file.
These samples are available in the following folder: Historian\Samples\VB