PRB: VFP ODBC Driver Cannot Be Used With ODBC Connection Pooling (229100)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- 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 <driver name> 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 <not pooled>.
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 <not pooled>, 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:
HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\<driver name>\[CPTimeout]
Where <driver name> is Microsoft FoxPro VFP Driver (*.dbf), Microsoft Visual FoxPro Driver, and Microsoft dBase VFP Driver (*.dbf).
REFERENCES
Microsoft Developer Network; search on: "Microsoft Transaction Server FAQ: Databases and Transactions"; topic: "ODBC Connection Pooling"
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbDatabase kbprb KB229100 |
---|
|