473,513 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script Without The GO Command

I am using scptxfr.exe to script out a SQL Server 2000 database. I want to
run the script inside a VB.NET application, but the scptxfr.exe adds the
keyword GO after every command, which I believe is not a transact-sql
statement, so it errors. I did not see a command line option to turn this
off. Any other way to script a database as in an automated way and not
include the GO command?

Derek Hart

May 7 '06 #1
1 1175
GO is not a TSQL statement, it is used by osql and query analyser to
determin when a batch ends so that you can have multiple batches in the
same file. Some commands require this (I believe create view must be the
only command in a batch unless you wrap it in a call to sp_executesql).

If it doesn't cause any problems you could just find replace GO with
blank.

Or you could split the file into multiple files at each GO statement and
execute each one.

Or you could copy the behaviour of osql by:
Creating a transaction
Read each line of the text file into a StringBuffer until you find a
'GO' statment
Execute the sql read on the transaction
Repeat until eof is found
Commit the transaction

On Sat, 6 May 2006 20:39:31 -0700, "Derek Hart" <de********@yahoo.com>
wrote:
I am using scptxfr.exe to script out a SQL Server 2000 database. I want to
run the script inside a VB.NET application, but the scptxfr.exe adds the
keyword GO after every command, which I believe is not a transact-sql
statement, so it errors. I did not see a command line option to turn this
off. Any other way to script a database as in an automated way and not
include the GO command?

Derek Hart

May 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3308
by: Sticks | last post by:
ok... im not quite sure how to describe my problem. i have a php script that runs through my entire php site and writes the resulting output to html files. this is necessary as the nature of the...
5
9186
by: deko | last post by:
In regard to running php scripts with cron - Here is a sample script: <?php //debug.php echo "<br> This is a test"; ?> I can call debug.php from a web page on my site like this:
4
1782
by: Jake j | last post by:
To those of you who sent me working examples of js include routines, much thanks. I see from them examples that what I'm trying to get to requires a higher level of js knowledge than I've got. ...
9
6661
by: Yaro | last post by:
Hello DB2/NT 8.1.3 Sorry for stupid questions. I am newbe in DB2. 1. How can I read *.sql script (with table and function definitions) into a database? Tool, command... 2. In Project Center...
17
7885
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script and the PHP script run as CLI. However, "info.php"...
3
4109
by: sir.linying | last post by:
My php script is to call perl scipt which makes use of Spreadsheet::ParseExcel module to parse Excel file. I am able to launch php script from command line so that perl script can run and properly...
0
265
by: Acrobat error in RS2000 and ASP2.0/2005 | last post by:
Hello, I am registering a client script that is a succession of strings appended. When I run the program, the script should open adobe acrobat with a .pdf file I generated. But the script opens...
5
6313
by: sat | last post by:
Hi, I'm working as a DB2 UDB DBA. I have some questions regarding SCP command... Actually every week redirect restore takes place from one of my production servers to test servers.. So, but...
1
2423
by: sophie_newbie | last post by:
Hi, I'm running a python script which if I run from the command line as root runs fine. But if I run it through the web-browser as a cgi script gives the following error "Error in X11: unable to...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.