Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed problem
Message
From
23/06/1999 18:30:57
 
 
To
23/06/1999 17:40:41
Jacques Parent
Marco Michaud Informatique Inc.
Val-D'Or, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00233238
Message ID:
00233258
Views:
29
>Hi! I wonder if someone can think of something...
>
>On a form, I call a screen who will serve to build a query (In screen, I have fields in witch I can enter text). The part to build the query is not the speed problem.
>
>The problem is that when I execute the query (The query is in a text variable and I execute it with "&SqlQuery"), it take about 4 1/2 minutes. If I put a suspend command in my code, and then I go in the VFP Command box then I execute the "&SqlQuery" command, it take 15-20 secondes!
>
>I tried to simplify the query as much as I could, I tried to get rid (just to try) of the "&SqlQuery" by having a "code" query insted but I have the same result.
>
>Does any body have a clue?

Instead of creating a string with your textboxes so you end up with

&SQLQuery where SQLQuery = "SELECT mycolumns FROM mytable WHERE someothercolumn = somevalue"

Use the text boxes to load properties (you can use variables if you like) so you end up with something more like this;

SELECT &mycolumns FROM &mytable WHERE &someothercolumn = &somevalue

You may find that the Fox SQL engine has an easier time parsing the query this way, and that could account for your time.

No guarantees, but it's a thought.

Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Previous
Reply
Map
View

Click here to load this message in the networking platform