| Subject |
Re: order by on different way |
| From |
Mervyn Bick <invalid@invalid.invalid> |
| Date |
Wed, 17 Nov 2021 15:39:25 +0200 |
| Newsgroups |
dbase.getting-started |
On 2021/11/17 06:58, Dirk wrote:
> thank you for the point of view, i just renew a form with several
> filters and these i want to replace with param. the form itself can
> create basic info as name and so, even filter on place postcode
> modifying the add function to a separate form to add new info will help.
>
> something else : what's your opnion about datalink, i know it's make
> live easier, but is using the field value not better ?
Dirk, this is difficult to comment on without a fuller picture of what
you have and what you want to get out of it.
Using a rowset's filter property to limit the records on view in an
existing rowset is very convenient. The filter string can be one of
several pre-set options or it can be put together "on the fly" if
necessary so one can allow the user to choose fields and the criteria
for each field. Once the filter string has been built in memory it can
be applied and the response is immediate.
Unfortunately a filter can only use the standard comparison operators.
Predicates such as BETWEEN, IS NULL, IS NOT NULL and LIKE are not
supported.
A parameter driven query gives one more power but it does need to be set
up up front. Changing the SQL statement and parameters "on the fly" can
be done but it's not something to be undertaken lightly.
Building a new SQL statement for a standard query is straightforward but
it can necessitate restating all the datalinks associated with the rowset.
In the end you will have to decide for yourself which route to follow.
Using datalinks can greatly simplify code. Inadvertent navigation in
the rowset can, however, result in changes being saved unexpectedly. On
the other hand, using an onNavigate event handler to populate controls
needs more work but nothing gets saved unless you want it saved.
Nowadays I use Firebird for all my own data. All queries for fetching
data for display are read-only. Datalinked controls can, therefore, not
be used for editing.
Mervyn.
|
|