BUG: "CancelOnEsc" Ignored by DBSetOpt() in FoxPro

ID: Q112486

The information in this article applies to:

SYMPTOMS

When using the Connectivity Kit to do a query from a table on a SQL Server machine, disabling the ESC key with DBSetOpts() does not work. This same command works correctly in FoxPro for Windows.

CAUSE

The current FPSQL.PLB file does not support this option.

STATUS

Microsoft has confirmed this to be a problem in the FoxPro version 2.5 Connectivity Kit. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

1. Load the SQL Server workstation software.

2. Run the following program:

      **** CODE STARTS HERE *****

         SET LIBRARY TO SYS(2004)+"fpsql.plb"
         handle=DBConnect("REDDFOXX","sa","")
         IF handle>0
            ?DBSetOpt(handle,"Asynchronous",0)
            ?DBSetOpt(handle,"CancelOnEsc",0)
            WAIT WINDOW "CONNECTION SUCCESSFUL" NOWAIT
            ?DBExec(handle,"use Tutorial")
            ?DBTables(handle)
            BROWSE
            * Press ESCAPE after you clear the Browse window
            ?DBExec(handle,"Select * from CUSTOMER","mycursor")
            BROWSE
         ELSE
            WAIT WINDOW "Connection Failed"
         ENDIF
         RELEASE LIBRARY fpsql.plb

      **** END CODE *****

For additional information about loading the SQL Server workstation software, please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q112482
   TITLE     : How to Make an MS-DOS Level SQL Server Connection

Additional reference words: FoxDos 2.50 2.50a 2.50b SetOptions ck buglist2.50 KBCategory: kbprg kbbuglist KBSubcategory:

Last Reviewed: April 18, 1995