Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have a problem I can't solve:
I try to store my tables with a loop (sorry, copy/paste of text doesn't work with my remote server)
For the debug purpose, I have a first loop that list all the tables of the datamodel
and I get 25 tables in output
...
but in the store loop, it stores 13 tables, and for the 14th, I get this
And I don't know which one is failing since it doesn't store in the same order than the debug loop
I don't understand why, could you help me ?
There is no mapping table
Hi @Chotana2
The problem is that you are dropping the tables so, the quantity of tables available is reducing - affecting your index. Your For Index Loop is expecting X number of tables in memory but you are removing the tables fro memory on every loop, that is why the table not found error.
Do a reverse approache:
FOR vTableNo = NoOfTables() - 1 TO 0 STEP -1
LET vTableName = TableName($(vTableNo));
DROP TABLE [$(vTableName)];
NEXT vTableNo
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
try it this way
Hi @Chotana2
The problem is that you are dropping the tables so, the quantity of tables available is reducing - affecting your index. Your For Index Loop is expecting X number of tables in memory but you are removing the tables fro memory on every loop, that is why the table not found error.
Do a reverse approache:
FOR vTableNo = NoOfTables() - 1 TO 0 STEP -1
LET vTableName = TableName($(vTableNo));
DROP TABLE [$(vTableName)];
NEXT vTableNo
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hello @marksouzacosta
I slept on it and I had a light up during the night and I think indeed this is the problem.
I'll try to keep the loop to store, and add a nex loop to drop.