Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Automatic Execute sql script

Author  Topic 

leos1981
Starting Member

3 Posts

Posted - 2005-10-23 : 03:21:25
Hi, I plan to create a program to allow user to execute batch scripts to update the database by double click the program instead of execute every scripts by query analyzer. At first, I try to use the ADODB's Execute method to run the scripts, but I get the error "Incorrect syntax near 'go'" because the method do not support the 'go' command. After do the search online about 4 hours I still cannot find a best solution for my problem. So, I post the message to the forum to see whether anyone can help me to solve it.

Actually, I find some posible methods to solve this problem, but I don't have confident it is a best solutions or not. First method is to write a function to remove the 'go' command before I execute the script. It is look like very dangerous cause removing the 'go' command may generate other error. Second method is to use the isql utility, but I don't have much of experiance about this method.

Thank you.

Kristen
Test

22859 Posts

Posted - 2005-10-23 : 03:22:38
Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=56798
Go to Top of Page
   

- Advertisement -