Hello,
I know the table I need to query in advance but not the fields. So I read the ABL pgming books about dynamic queries. In essence they say that you'll take a performance hit by using dynamic queries, of course. But, if you can get away with having just the where clause dynamic it will not be as bad.
The way this is done is by assigning a handle to the static query and opening it just as a dynamic query. How can this be faster? Or am I missing something here???
DEFINE QUERY crapQry FOR crap.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.
hQry = QUERY crapQry:HANDLE
hQry:QUERY-PREPARE("FOR EACH crap WHERE type = 'baja'").
hQry:QUERY-OPEN().
...........
TIA!
I know the table I need to query in advance but not the fields. So I read the ABL pgming books about dynamic queries. In essence they say that you'll take a performance hit by using dynamic queries, of course. But, if you can get away with having just the where clause dynamic it will not be as bad.
The way this is done is by assigning a handle to the static query and opening it just as a dynamic query. How can this be faster? Or am I missing something here???
DEFINE QUERY crapQry FOR crap.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.
hQry = QUERY crapQry:HANDLE
hQry:QUERY-PREPARE("FOR EACH crap WHERE type = 'baja'").
hQry:QUERY-OPEN().
...........
TIA!