Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to speed this up?
Message
 
 
To
30/10/2007 14:04:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01265099
Message ID:
01265128
Views:
12
>Not true,
>The query doesn't CHECKING if the parameter is empty or not, but the meaning of this is:
>If I pass EMPTY(ldDateReqd) I want ALL records no matter of the value of Ordhead.daterequired, if I pass nLocation=0 I want ALL records no matter of Ordhead.location value. Par example(Ignoring the rest of the WHERE clause):
>
>
>*** I want ALL records no matter the location and daterequired
>ldDateReqd = {}
>lnLocation = 0
>REQUERY(ViewHere)
>
>*** I want ALL records no matter the location but for specific period (OK not period :o))
>ldDateReqd = DATE()-50
>lnLocation = 0
>REQUERY(ViewHere)
>
>*** I want ALL records for specific location
>ldDateReqd = {}
>lnLocation = 1
>REQUERY(ViewHere)
>
>*** And finally I want ALL records for specific location and specific dates
>ldDateReqd = DATE()-50
>lnLocation = 1
>REQUERY(ViewHere)
>
If this is the case, then using a view is probably not a good idea, since we may want to form the where clause depending on number of parameters passed. We had our Advanced Search originally designed with views and OR conditions depending on parameters. I changed it to use CursorAdapter, created its properties (SelectCMD) on the fly and it worked several times faster than the original approach.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform