ODBC Registry Foundation Class

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

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

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 Classes for 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

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Class Samples