Hello.

What is the best way to run a series of SQL scripts
from *.sql files (for MS SQL Server) - for example
for creating a database on client machine.
Our application runs on CA classes, ADO.
And 2nd question - any thoughts on integrating MSDE
installation into InstallShield project - so far no success.

M.Kujawa

Re: running SQL scripts by Trey

Trey
Sun Dec 28 22:35:35 CST 2003

If the .sql files can be opened and executed as is in Query Analyzer, then
you can run them through SPT much the same way
if you have a list of these files in a table, you can scan through it, e.g.

nHandle=SQLSTRINGCONNECT("<connect string here>")
Select 0
USE sqlFileList
Scan
** cSQLFile is assumed to be full path and file name to the file
SQLEXEC(nHandle, FileToStr(Alltrim(cSQLFile)))
If AError(laError)>0
** handle any errors
EndIf
EndScan



"Maciej Kujawa" <mattk@mk.com> wrote in message
news:bsn8sd$egcp6$1@ID-61890.news.uni-berlin.de...
> Hello.
>
> What is the best way to run a series of SQL scripts
> from *.sql files (for MS SQL Server) - for example
> for creating a database on client machine.
> Our application runs on CA classes, ADO.
> And 2nd question - any thoughts on integrating MSDE
> installation into InstallShield project - so far no success.
>
> M.Kujawa
>
>
>