Single-Tier Drivers Don't Support Asynchronous ProcessingID: Q114355 2.50 2.50a 2.50b 2.60 3.00 WINDOWS kbinterop The information in this article applies to:
SUMMARYAfter you have set the connection option to Asynchronous using the Connectivity Kit's DBSetOpt() command, DBExec() commands are still processed synchronously when you are using a single-tier driver. The asynchronous connect option works only with two-tier drivers; it is ignored when you are using a single-tier driver.
MORE INFORMATIONA single-tier driver is a driver that directly reads from and writes to a database such as the FoxPro, Btrieve, dBASE, Microsoft Excel, and text file drivers. A two-tier driver is a driver that connects to another DBMS such as SQL Server and ORACLE. NOTE: dBASE is manufactured by a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability. The Asynchronous connection option works with two-tier drivers only if a connection is actually made. When a DBExec() command is processed with the connection option set to Asynchronous, the DBExec() command has to be continually called until all the results are returned. If the code below is run through a trace, it demonstrates that the single- tier driver processes the SQL statement synchronously. Note that the DO WHILE statement is never executed. NOTE: Depending on your version of FoxPro, use one of the following two code examples:
FoxPro 2.x Code:
Visual FoxPro Code:
**** foxtest is a datasource name for a single-tier FoxPro database driver.
**** The customer table must be in the
**** This DO WHILE code below is never executed because retcode=1....
**** i.e., the DBExec() above returns all the results synchronously.
REFERENCESFoxPro Connectivity Kit "User's Guide," version 2.5, pages 26-27, 31-32, 35, 38-39, and 46-47 Additional reference words: VFoxWin 3.00 FoxWin 2.50 2.50a 2.50b 2.60 ck KBCategory: kbinterop KBSubcategory: FxtoolCk
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |