Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requery a SQL pass-through query
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00642228
Message ID:
00642252
Views:
19
Hi Hector,

Maybe my code is wrong, but I don't see any difference...

Here's what I do : I have 2 functions, one that does the SQLPREPARE() and the first SQLEXEC(), and a second function to requery that does only the SQLEXEC(). Here's my code :

FUNCTION CREATE_CURSOR
LPARAMETERS U_P_SQL_REQUEST,U_P_ALIAS
LOCAL U_RETURN

SQLPREPARE(ID_CONNECTION,U_P_SQL_REQUEST,U_P_ALIAS)
U_RETURN = SQLEXEC(ID_CONNECTION)
CURSORSETPROP("Buffering" ,3)
CURSORSETPROP("Prepared" ,.T.)
CURSORSETPROP("SendUpdates" ,.F.)

GO TOP

RETURN (U_RETURN > 0)

ENDFUNC && CREATE_CURSOR


FUNCTION REFRESH_CURSOR

SQLEXEC(ID_CONNECTION)

ENDFUNC && REFRESH_CURS0R



Here's the code I use to call those functions :

TOTO = DATETIME()
CREATE_CURSOR("SELECT TOP 100000 * FROM FACT_CLI_X","FACT_CLI_X")
MESSAGEBOX(STR(DATETIME() - TOTO))

BROWSE

TOTO = DATETIME()
REFRESH_CURSoR()
MESSAGEBOX(STR(DATETIME() - TOTO))

BROWSE
USE

The first and the second MESSAGEBOX() returns exactly the same result, so there's no time saving !


Thanks again for your help !!
********************************************

Benoit Grenier


encoder@silogic.ca (Job)
encoder@sympatico.ca (home)
Web site : www.silogic.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform