Visual Basic: Code Sample Information

This sample uses class properties introduced in Visual Basic 6.0. It will not work with earlier versions of Visual Basic. For more information about building simple providers with Visual Basic 5.0, refer to the section Microsoft Visual Basic.

The Visual Basic Simple Provider code sample is located in ..\Samples\Dataaccess\Osp\Vb and consists of the files described in the following table.

File name

Description

SampleOSP.vbp

Visual Basic project file for the sample.

MyDataSource.cls

Class module for msDataSourceObject.

MyOSPObject.cls

Class module containing the following:

  • Routines to create an internal table, load data into the table from an external file, and save the data.

  • OSP method implementations.

SampleOSP_VB.reg

Copy of the RegisterProvider.reg file for use with the Visual Basic sample.

Important

This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, write a fully functional OLE DB provider using the native OLE DB interfaces.