Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why do queries take longer in a private datasession?
Message
From
21/07/1999 15:19:11
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00244276
Message ID:
00244295
Views:
18
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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform