Microsoft KB Archive/229100

= PRB: VFP ODBC Driver Cannot Be Used With ODBC Connection Pooling =

Article ID: 229100

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Data Access Components 2.5

-



This article was previously published under Q229100



SYMPTOMS
If connection pooling is enabled for the following ODBC drivers:


 * Microsoft Visual FoxPro Driver
 * Microsoft FoxPro VFP Driver (*.dbf)
 * Microsoft dBase VFP Driver (*.dbf)

The following error may occur:

"Exception occurred within ODBC driver during disconnect operation, likely not thread-safe ..."



CAUSE
The ODBC manager requires that all ODBC drivers that use Connection Pooling be threadsafe. Despite the entry in the help file, the Visual FoxPro ODBC driver (Vfpodbc.dll) is not a threadsafe ODBC driver.



RESOLUTION
Do not enable connection pooling for the Visual FoxPro driver.



STATUS
This behavior is by design.



MORE INFORMATION
To ensure that connection pooling is not enabled for the Visual FoxPro ODBC driver, check the Microsoft FoxPro VFP Driver (*.dbf) and the Microsoft Visual FoxPro Driver entry in the Connection Pooling tab of the ODBC Control Panel. Both of these entries should say.

For the ODBC 3.5 Driver Manager, connection pooling is controlled on a driver by driver basis through the CPTimeout registry setting. If the setting is not present, or if it is set to, connection pooling is disabled for that driver. Other valid entries will be a string value that specifies the timeout in seconds.

For the ODBC 3.0 Driver Manager, connection pooling is enabled by default, and cannot be disabled through the registry.

The connection pooling setting is kept in a registry entry for each ODBC driver. The following registry key is created by default when installing the Visual FoxPro ODBC driver:

Where is Microsoft FoxPro VFP Driver (*.dbf), Microsoft Visual FoxPro Driver, and Microsoft dBase VFP Driver (*.dbf).

