Compartir a través de


ODBC Registry Foundation Class

This class provides a set of registry functions that return ODBC-specific information such as drivers and data sources.

Category

System Utilities

Default Catalog

Visual FoxPro Catalog\Foundation Classes\Utilities

Class

_odbcreg

Base Class

Custom

Class Library

registry.vcx

Parent Class

registry

Sample

...\Samples\Solution\WinAPI\regodbc.scx

Remarks

To use, drop the class on a project or form or, from the Component Gallery Item shortcut menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class on the form. You can then specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classesfor more information on using foundation classes.

Properties, Events, Methods

Description

LoadODBCFuncs method

Loads the ODBC registry functions.

Syntax: LoadODBCFuncs( )

Return: none

Arguments: none

GetODBCDrvrs method

Retrieves ODBC drivers.

Syntax: GetODBCDrvrs(@aDrvrs, lDataSources)

Return: nRetVal

Arguments: aDrvrs specifies, in an array, the drivers to retrieve.lDataSources specifies whether to access datasources.

EnumODBCDrvrs method

Enumerates through ODBC drivers.

Syntax: EnumODBCDrvrs(@aDrvrOpts, cODBCDriver)

Return: aDrvrOpts, m.cSourceKey, HKEY_LOCAL_MACHINE, .F.

Arguments: aDrvrOpts specifies available driver options.cODBCDriver specifies the driver name.

EnumODBCData method

Enumerates through ODBC data sources.

Syntax: EnumODBCData(@aDrvrOpts, cDataSource)

Return: aDrvrOpts, m.cSourceKey, HKEY_CURRENT_USER, .F.

Arguments: aDrvrOpts specifies available driver options.cDataSource specifies the name of the data source.

See Also

Concepts

Guidelines for Using Visual FoxPro Foundation Classes

Reference

Visual FoxPro Foundation Classes A-Z

Other Resources

Foundation Class Samples