Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 9 Jahren, 10 Monaten
Letzter Beitrag:
vor 9 Jahren, 10 Monaten
Beteiligte Autoren:
Stefan Bentvelsen, M. Beaven, Fabrice Harari.pcs.crosspost

WD12: existance of a query item

Startbeitrag von Stefan Bentvelsen am 24.09.2008 10:23

Hi all,

in a global procedure for formatting an address I want to know if the file or query of parameter #1 contains a specific item, i.e. 'aanvulling'. I case of a query, the query is currently running, but if I try to list the items with HListItem, I get an empty string as result.
The query is executed with HExecuteSQLQuery().

Anyone another suggestion to know if the item exist or why I get no result with HListItem() ?

Antworten:

Nobody ?

von Stefan Bentvelsen - am 25.09.2008 12:06
Hi Stefan...

You can always access it by QueryOrFileName.ItemName and trap a
potential error with exception management

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on http://www.fabriceharari.com


Stefan Bentvelsen wrote:
> Hi all,
> in a global procedure for formatting an address I want to know if the file or query of parameter #1 contains a specific item, i.e. 'aanvulling'. I case of a query, the query is currently running, but if I try to list the items with HListItem, I get an empty string as result.
> The query is executed with HExecuteSQLQuery().
> Anyone another suggestion to know if the item exist or why I get no result with HListItem() ?
>
Message forwarded from pcsoft.us.windev

von Fabrice Harari.pcs.crosspost - am 25.09.2008 13:18
Hi Stefan,

Whilst I don't use HExecuteSQLQuery(), I am using HListItem() in conjunction with HExecuteQuery() and the only prerequisite in this case has been that an HRead() precede the HListItem(). Are you doing any HRead on the query result in your case?

Regards,

-Marc

von M. Beaven - am 25.09.2008 14:30

Re: WD12: existance of a query item (Solved)

Hi Marc, Fabrice,

no I don't Hread before the HListItem().

But the problem is solved. With the HListItem I used the option hLstItem to only list non-key items. But it seems that the items of a query (executed by HExecuteSqlQuery) are all key-items instead of non-key items. So the only thing I had to do is using the option hLstAll or hLstKey within the HListItem statement. Now it works OK.

Only question now is: why are all the items of a query considered as key-items?

Thanks for your time.



von Stefan Bentvelsen - am 27.09.2008 17:49
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.