Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 6 Jahren, 5 Monaten
Letzter Beitrag:
vor 6 Jahren, 5 Monaten
Beteiligte Autoren:
Al , Manfred

WD Best method to find a phone number in HF Classic field

Startbeitrag von Manfred am 14.03.2012 23:04

Yes i several asked this topic, but the programming got this nice side, the recursion, present in me sometimes :xcool:

I have a HF CLASSIC FILE with a FIELD (STRING 50) indexed Unique key

Which is the best method to find a phone number in that field,

I confused

Hreadseekfirst, hread, hreadseek or what suggests.

Note: The number are standarized 43398999 or 110029393

Thanks for the supp.


Hello Manfred

Do you know the complete number you are looking for or are you looking for matches on parts of the number ?

For the complete number, I think HreadSeekFirst(File,PhoneIndex,PhoneNumber) would be the best. If you don't need to read the value but just check if the number is in the file then HSeekFirst() is quicker.

If the data in your file is in the old 5.5 compatible mode then you will need to use HreadSeekFirst(File,PhoneIndex,Complete(PhoneNumber,50))


von Al - am 15.03.2012 04:20
Thanks AI, How See this?


and the pass the point fields...

Can be better?


von Manfred - am 15.03.2012 12:11
Hello Manfred

I suppose its a question of personal style and coding habits. For a single item I still use HreadSeekFirst() but thats because the majority of our code has always been written that way and we are only just getting into using SQL. It also depends on how you are using the found record. If I am populating a window with FileToScreen() then the window fields are linked to the file so HreadSeekFirst() would seem to be the best way.


von Al - am 15.03.2012 13:35
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.