Red Gate forums :: View topic - Building Packager Applikation or C# Project based on Script.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 7
SQL Packager 7 forum

Building Packager Applikation or C# Project based on Script.

Search in SQL Packager 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mrupprath



Joined: 09 Jan 2014
Posts: 1

PostPosted: Fri Jan 10, 2014 11:27 am    Post subject: Building Packager Applikation or C# Project based on Script. Reply with quote

Hello;
we tried to build a SQl Package Solution based on a SQL Script.

If i am right, SQl Packager analyses the script and crates a resource file
wich a number of Batches using "GO" T-SQL Statement for Detecting of a new Batch.

Unfortunately we run into several errors all like this "Error near GO..."
We analysed the resourcefile and found out that sometimes the Go statemens remains inside of some Batchentries of the resource file.
After we manually deleted the GO Statements, it worked.

Because this is only a suitable solution for small resourcefiles reworking the resourcefiles by hand is a bad solution.

Can someone explain how the resouzrcefile is build according to the sal script, and how to handle our Problem

Greatings.
Back to top
View user's profile Send private message Send e-mail
Brian Donahue



Joined: 23 Aug 2004
Posts: 6645

PostPosted: Mon Jan 13, 2014 12:39 pm    Post subject: Reply with quote

SQL Packager should be able to determine that a batch separator is present in a file and handle it appropriately. It breaks the script into lines, then checks that the line starts with GO and is on its' own line. That line will be a batch separator and Packager will not try to execute it.

Some things I guess could go wrong are... GO not being capitalized, GO not being the start of the line, or something about the end-of-line characters (MSDOS CRLF sequence is a safe bet...).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group