>>You can not use parameter the way you're using. The SELECT * from tableName should be send as is, e.g.
>>
>>sqlCommand = 'select * from ' + tableName + ';'
>>
>>You can probably send several commands at once and use multiple result sets (say, do 10 tables in one command).
>
>
>That worked. Now how to deal the the Copy to variable?
What exactly do you mean? What is your new code and what do you need help with?
If it's not broken, fix it until it is.
My Blog