ODBC CALL escape sequence versus SQL_NOSCAN_ON

ODBC CALL escape sequence versus SQL_NOSCAN_ON

Post by Ionut Fili » Fri, 02 Jun 2000 04:00:00



I can call my stored procedures (via ODBC) either using the ODBC CALL
escape sequence
    {call procedure(?,?,..?)}
or using the transact SQL
    execute procedure ?,?..?

the first one is recommended because they say is faster, but to use it i
must set the
SQL_NOSCAN option to SQL_NOSCAN_OFF, which in turn they say it affects
the performance as well...so which of the 2 evil things are better here?

thanks in advance

ionut

 
 
 

1. ON ESCAPE versus ON KEY LABEL ESCAPE

I have an application in FoxPro 2.6a/Windows and want functionality in
various places allowing me to quit a routine using the ESC key. I have
experimented with creating code early in programs such as

SET ESCAPE ON
ON ESCAPE DO endthis

However, I find that this does not always give me good results. It seems
that this command does not cause execution of PROCEDURE endthis when
pressing the ESC key if the program is pausing at a READ. Is this
intentional, or is there something wrong with my installation, or
something else amiss in my configuration, say? The FoxPro help does not
suggest that ON ESCAPE does not function when you are at a READ.

My workaround has been to instead use a command such as

ON KEY LABEL ESC DO endthis

Below, I have pasted code illustrating my point. At the bottom is the
example given in the FoxPro Help. Above this is a test routine that
illustrates the behavior, at least on my system. Note that you can
optionally comment out the ON KEY LABEL ESC line and run the code with
the ON ESCAPE line. Where can I look for a clear and complete
explanation of ON ESCAPE vs. ON KEY LABEL ESC, and related issues.
Thanks for any light you can shed on this.

Dan
-----------------------------------------------------------------------------
PROCEDURE test_esc
SET ESCAPE ON
*ON ESCAPE DO endthis
ON KEY LABEL ESC DO endthis
mexit=.F.
DO WHILE not mexit
        myget=space(25)

Press ESC to exit. "GET myget
        READ
ENDDO
RETURN

PROCEDURE endthis
manswer=SPACE(25)

Say "Yes" to exit. ' GET manswer
READ
IF upper(manswer) = 'YES'
        ON ESCAPE
        ON KEY LABEL ESC
        mexit=.T.
        CLEAR READ
        CLEAR
ELSE
        CLEAR
ENDIF
RETURN
****
* FoxPro help example:

SET ESCAPE ON
ON ESCAPE DO stopit
WAIT WINDOW 'Press Esc to stop loop' NOWAIT
moreloop = .T.
DO WHILE moreloop
ENDDO
RETURN
PROCEDURE stopit
IF ALERT('Do you really want to stop this shit?','Yes;No')=1
        moreloop = .F.
ENDIF
RETURN

2. Help? Please?

3. ODBC Escape Sequence and Outer Joins

4. Change Logical Filename in 7.0

5. ODBC Escape Sequence

6. DTS Package SaveToSQLServer Method Parameters

7. ODBC escape sequence

8. revelation newsgo roup wanted

9. odbc escape sequence Oracle

10. ODBC Escape Sequences

11. ODBC Escape Sequence and Outer Joins

12. ODBC Call Escapte Sequence