Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello i need to know if the LOAD INLINE statement included in a config file are visible in the script at the reload process.
I have a table like this:
TAB:
LOAD * INLINE [
A, B
VAL1, VAL2
];
in the config file included with this statement $(include=../SETTINGS/config.txt);
but when i use this expression in the script: LET noRows = NoOfRows('TAB');
i get NULL.
Is it correct?
Thanks
Marco
$(include=....); will fail silently if something goes wrong.
Try $(Must_include=../SETTINGS/config.txt); to make sure that you get an error if the config.txt file can't be loaded.
Hi,
As gwassenaar mentioned yes Must_Include is best option as it will alert you when it fails. However what am thinking of it why don't you test your include with full file path, the UNC path might not be right.
Now it's working.
Thanks
Marco
I have tried with the absolute path as you have mentioned but now it's not working in both methods.
Now the table is not visible with the LET noRows = NoOfRows('TAB'); statement.
How can i do?
Thanks
Marco
Hi,
Load the Table TAB into QV , as in the script inside the txt file and use your variable noRows instead of include.
If possible share your file and the txt file for the include
use must_include
check in table viewer after reload the table is created
add some trace
$(must_include=../SETTINGS/config.txt);
LET noRows = NoOfRows('TAB');
trace noRows=$(noRows);
Maybe you should try a path specification with backslashes (e.g. \) instead of forward slashes (e.g. /)...
Peter
I have used the absolute path to locate the config file, but after having inserted another definition in the config file, i get null value when i try to get the NoOfRows('TAB1'); value.
What can i do to get the correct value?
Thanks
Marco
Usually this means that the TAB1 table does not exist. Are you sure it is there when you call NoOfRows()? Use the Debug option in your script editor, or add Trace statements to get an idea of the path the execution engine follows in reality.
Best,
Peter