hello,<BR><BR>I'm trying to create arrays based on table names pulled from a DB.<BR><BR>problem is... how do we add this names to the dim?<BR><BR>dim ar&stringname(100)<BR><BR>doesn't work. :/
...you have to give it a name, and the name has to be a literal - it can't be based on a variable.<BR><BR>What are you trying to do exactly? Why do you need variables with different names?<BR><BR>If all your tables have the same number of records you could create a two-dimensional array, i.e. myTableData(numberoftables, numberofrecords). If you have different record numbers in each table, you could try using the dictionary object or something similar.<BR><BR>Oliver.
...with VBScript version 5.x.<BR><BR>BUT...<BR><BR>Suppose you managed to do this. Suppose you have your code littered with statements that are equivalent to<BR> Dim arbazzlefrazz(100)<BR> Dim arfrmaizwiaee(100)<BR> Dim arinventory_at_end_of_year(100)<BR><BR>Now... HOW THE HECK are you going to write code that *USES* those arrays?????<BR><BR>So Oliver's answer is correct: DON'T DO IT.<BR><BR>Rethink your approach to the problem. There's something wrong with it, I can virtually guarantee.<BR><BR>