MDAC 2.5 SDK - Visual FoxPro ODBC Driver


 

Thread Support

The Visual FoxPro ODBC Driver is thread-safe. Access to environment handles (henv), connection handles (hdbc), and statement handles (hstmt) is wrapped in appropriate semaphores to prevent other processes from accessing and potentially altering the driver's internal data structures.

In a multithreaded application, you can cancel a function that is running synchronously on an hstmt by calling SQLCancel on a separate thread.

The driver uses a separate thread to fetch data when you use progressive fetching. To employ progressive fetching for a data source, check the Fetch data in background checkbox on the ODBC Visual FoxPro Setup dialog box or use the BackgroundFetch attribute keyword in your connection string. Avoid using background fetch when calling the driver from multithreaded applications. For information on connection string attribute keywords, see Using Connection Strings.

For more information about threads and SQLCancel, see SQLCancel in the ODBC Programmer's Reference.