PDA

View Full Version : Sql Scripts on updates



NewsArchive
11-15-2007, 02:57 AM
Friedrich,

This is an app composed of some exes,dlls, etc.
It runs over a Sql 2000 server.
When a changed is made to the database, a script is saved to be run on the
cliente server at update time.
Then, to update de app you need to copy some files and to "run some sql
scripts".
Today all the update process is hand made.
How can it be done with SB?

--

Regards,

Alberto
CIO CPSistemas
www.cpsistemas.cjb.net
www.gymec.com.ar

NewsArchive
11-15-2007, 02:58 AM
Alberto,

To copy files, you can use the "Copy File(s)" script function.

To run sql scripts, use the osql.exe utility in a "Run Command Line"
function.

Something like:

c:\mssql7\binn\osql.exe -S SERVERNAME_GOES_HERE -Usa -P -i test.sql

You only have to determine where the osql.exe tool is located (replace
c:\mssql7\binn with a variable).

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
11-15-2007, 02:58 AM
Yes , this helps, and...

How can I add to the installer "all the files contained in some directory",
instead of to select one by one?
Can it be done at script level?

Regards
Alberto

NewsArchive
11-15-2007, 03:00 AM
Hi Alberto,

> Yes , this helps, and...
>
> How can I add to the installer "all the files contained in some
> directory", instead of to select one by one?
> Can it be done at script level?

Very easy to do (can be done in both the Visualizer and Script Editor). In
the "File Properties" dialog, select the "File Linking" tab. Define the
Source Folder and in the Source Filename field, enter *.*

You can even define an exclude list or exclude wildcards. To recursively
compile, mark the "Recurse Subfolders" checkbox.

Does this help?

Friedrich