Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why do queries take longer in a private datasession?
Message
De
21/07/1999 15:19:11
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00244276
Message ID:
00244295
Vues:
24
Thanks to Todd and Tom for their execellent suggestions. By using SYS(3054,1), I was able to verify that the query is optimized in the default datasession, but not in the private datasession. The weird thing here is, the code is unchanged. The only change I made between test runs was to change the datasession type of the form from 2 to 1. So I'm guessing there's some property of the datasession itself that needs to be tweaked.

Here's the code:
*-- cmd_test.click
*-- test running a filtered report
local lcFilter, lcSaveAlias, lnSaveRec

lcSaveAlias = alias()
lnSaveRec = recno()
if empty(set("filter"))
	lcFilter = "PRINTNO = '" + thisform.txt_printno.value + "'"
else
	lcFilter = set("filter")
endif

use imprn in 0 again alias imprn_rpt shared
select * from imprn_rpt into cursor rptcursor where &lcFilter
report form reports\imprn_r1 preview

select rptcursor
use
select imprn_rpt
use

select &lcSaveAlias
goto lnSaveRec
(NASM's not a bad place to be a programmer, Todd. As one of my former supervisors used to say, "The Smithsonian may not have money, but it has state-of-the-art problems.")

Thanks,
BEW
Barbara Weitbrecht
Archives Division
National Air & Space Museum
Smithsonian Institution

"Magic is real... unless defined as integer"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform