|
This section helps you to integrate the Pervasive OLE DB provider into your Visual Basic development environment.
This procedure shows how to program in ADO and OLE DB without using the visual control objects.
To program for OLE DB in Visual Basic:
myData.CursorLocation = adUseServer myData.Open "Person", "Provider=PervasiveOLEDB;Data Source=DemoData", adOpenDynamic, adLockOptimistic, adCmdTableDirect
Private Sub DisplayFields() Text1 = myData.Fields(0) Text2 = myData.Fields(1) Text3 = myData.Fields(2) End Sub
The Pervasive provider has one property that is essential for initialization, and that is Data Source. OLE DB providers do not use DSN's, so the Data Source property should be set to a DBNames value. For example, the connection string for an ADO Connection::Open command would be "Provider=PervasiveOLEDB;Data Source=<data store>", where <data store> is a DBName.
To use the provider to fill a grid in Visual Basic:
|
Chapter contents
Prev topic: ADO/OLE DB Reference Information
|