I have to admit that I did not read the entire script.

What happens if you put a sleep after each SQL command so the SQL server has some time to process the stuff?

Code:

SQL command here
sleep 2
next SQL command



Edited by Mart (2006-11-09 12:19 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.