Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I have a loop that try to reload table few times before fail or end loop if there is no fail.
But for some reason the script try to load table only once and the res of times just switch counter.
Can someone explain why the script didn't work as expected?
Set ErrorMode = 0;
Set i= 0;
Do while i < 4
LOAD Non_Exist_Field FROM Table.qvd (qvd);
Exit Do When ScriptErrorCount = 0;
Let i= i+ 1;
Loop
Set ErrorMode = 1;
I find the reason that makes me doubt. At the load scree I see only amount of reloads via trace function. And in the same time I see there that table load appeared only once. But in the debug mode I saw that everything fine. 🙂
Thank you for attention to my question.
Not sure what the script is supposed to achieve but it works for me (i.e. the table is reloaded multiple times)
Pure syntactically your script is working but logically it makes not much sense to load the same data multiple times within the same table - without adding any sensible context, for example with rowno() or aggregating the data in any way, like a count() within a chart you won't see that the data are loaded several times.
I assume that your aim is to check if certain fields exists within a qvd or not. For this task it's IMO better not to load the data within a loop with the ERRORMODE else to use qvdnooffields() and qvdfieldname() to get the information from the meta-data of the qvd.
- Marcus
I have several load tasks in my work that are connected by schedule through a web connector to the same web document - task at the same time. Sometimes this causes some app to fail due to they cannot connect to this doc. This script is needed so that the task does not break off after the first fail and tries to reconnect several times.
I find the reason that makes me doubt. At the load scree I see only amount of reloads via trace function. And in the same time I see there that table load appeared only once. But in the debug mode I saw that everything fine. 🙂
Thank you for attention to my question.