Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 2 Monaten, 3 Wochen
Letzter Beitrag:
vor 2 Monaten, 3 Wochen
Beteiligte Autoren:
Fabrice Harari, DarrenF, Markus K., JP

[WD21] - Hiding / Showing records

Startbeitrag von JP am 15.09.2017 05:22

Hi All

I have a database file with various records. How I can hide some of these records from HREAD...() searches and at other times allow them to be included in HREAD...() searche results?

I thought of using HFILTER() on a field condition to exclude records but when I apply the filter and then subsequently run a HREADSEEKFIRST() on a different index key WinDev crashes and says the HREADSEEKFIRST() caused a fault: unexpected system error.

Thanks.

Antworten:

Hi,
why dont you use SQL?

von Markus K. - am 15.09.2017 06:40
Hi JP,

If you're thinking of using hFilter, don't do it. I started out using filters, but soon realised that SQL with parameters is much more flexible. E.g. if you write a query using parameters, you can use it with tables, but if you've designed it properly, you can use the query anywhere in your project

von DarrenF - am 15.09.2017 07:17
Hi JP

it doesn't matter if you use a filter or a query. For what you want to do, the best way is to create a COMPOSITE key made of:
1. your exclusion criteria
2. your 'real' key

By doing that, you can either use a hfilter on the composite key and get what you need, or do a query with conditions on both fields and get a speedy answer. In the query, if you want to completely ignore the exclusion criteria, you can do that by setting that parameter to null.

best regards

von Fabrice Harari - am 15.09.2017 14:27
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.