Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP60- Find Class
Message
De
14/01/2000 05:46:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/01/2000 14:26:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00317835
Message ID:
00318086
Vues:
30
>Does anybody in here has a class or code that let me search just like the FIND DIALOG CLASS that comes with VFP 6.0 but in more than one table?
>
>The Find Dialog Class searches in the parent table only, not in the child table (my case).
>
>Thank you in advance, any comments will be welcome.


Morys,
I had a never finished thus found its way to trash code :) Outline is as follows (considering ppl would want to search for what they could see on a form - IOW QBE) :
-Begin a transaction
-Add new record to parent and all childs
-Let the user fill in (in an enhanced version with wildcards and identifiers such as !, except). Also fields with controlsources of type numeric, date* etc should be more flexible to accept a range (at least I had done this part with a class that invokes a "range" container and returns a string like "between ...":)
-Using relations in DE and/or grid properties start to create SQL body
-Traverse all controls on form (including grids) to collect non-empty ones (or let control classes do it as their value changed when lsearchmode = .t.)
-Build where part using collected data (where -controlsource- -operator- -value- ...)
-Rollback
-Run SQL and get just parent PK list

Complexity and time to code was my main reasons to quit doing it (or postpone). Hope there is a ready one.
BTW: If you also keep a view (whether you don't use it directly) with necessary connections to childs and it's "initial selected alias" find dialog might utilize it. But I don't use "find dialog class" and don't know if that's the case or not.
Good luck
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform