Welcome! Log In Create A New Profile

Advanced

WD12: existance of a query item

Posted by Stefan Bentvelsen 
Stefan Bentvelsen
WD12: existance of a query item
September 24, 2008 12:23PM
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() ?
Stefan Bentvelsen
Re: WD12: existance of a query item
September 25, 2008 02:06PM
Nobody ?
Fabrice Harari.pcs.crosspost
Re: WD12: existance of a query item
September 25, 2008 03:18PM
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 [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
M. Beaven
Re: WD12: existance of a query item
September 25, 2008 04:30PM
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
Stefan Bentvelsen
Re: WD12: existance of a query item (Solved)
September 27, 2008 07:49PM
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.

Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: