Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 4 Jahren, 7 Monaten
Letzter Beitrag:
vor 4 Jahren, 7 Monaten
Beteiligte Autoren:
RAUL2, DerekT, Arie

[WD] Underlying selected record

Startbeitrag von RAUL2 am 30.05.2013 20:21

Hello guys, I have this doubt.

I have a combobox which data source is an independent query. The query have 3 fields: the description (shown in the combo), the ID (the stored value) and a FK (type int) which I will need after the user did his/her selection. The thing is that when the user selects a row from the query, the combo gives me the ID, and it's right because I need it, of course, but I also need the FK (3th field) and I don't have any property to store it. So, what I do is to see that field in the underlying query, but the record pointer didn't move with the user selection in the combo.

Is there other way rather than seek the stored ID in the query with HSeek...() or something like that?

Regards.

Antworten:

Raul you can just use HReadSeekFirst(query,id-field,ID) just as you are used to do with regular files.

von Arie - am 30.05.2013 20:25
Another alternative is to define the combo as a table - you can then read it as combo.filedname

You will need to fiddle with the look of the combo as declaring it as a table uses uses a different (unpleasant) style.

von DerekT - am 30.05.2013 22:10
Thank you guys for your replies.
Arie's choice is how I've solved this before, but I was looking for something easier. I'll also try Derek's suggestion.
Regards.

von RAUL2 - am 30.05.2013 22:13
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.