Thanks.
--
Mike Tissington, MCSD, MCDBA
Shimmering Water
http://oaklodge.com
-
You can make a connection to the SQL Server and simply execute the content
in the .SQL file.
1. Read the T-SQL statements
2. Execute it over DAO or ADO.
Do you encounter any errors when doing this?
Peter
"Mike Tissington" <mi...@oaklodge.com> wrote in message
news:#5R1nS04AHA.964@tkmsftngp03...
--
Mike Tissington, MCSD, MCDBA
Shimmering Water
http://oaklodge.com
-
"Peter" <pwno...@microsoft.com> wrote in message
news:jr0GEc1...@cppssbbsa01.microsoft.com...
The sql containes a lot of T-SQL for deleteing and creating TABLES/SPROCs
etc ...
If I execute the sql with Query Analyizer then it works.
--
Mike Tissington, MCSD, MCDBA
Shimmering Water
http://oaklodge.com
-
"Mike Tissington" <mi...@oaklodge.com> wrote in message
news:uj1stF54AHA.1256@tkmsftngp03...
-Josh Heyse
Morse Data Corp
Thanks.
.
C:\PROGRA~1\MICROS~4\80\TOOLS\BINN>isql -U user -P password -S server -d master -
i C:\sql.sql -o C:\output.txt
It ran great. Now all I have to do is use CreateProcess to replicate this
command line and go from there.
I Hope this has helped.
Josh Heyse
Morse Data Corp.
Thanks.
..
.
That is what SQL Query Analyzer is doing, so you need to do the parsing your
self, read up to the next GO and submit that for execution, handle the
results and read the next batch, never include the GO statements into what
you send to the server.
-GertD
"Josh Heyse" <jo...@morsedata.com> wrote in message
news:079b01c0e3b4$b58b2f30$9ee62ecf@tkmsftngxa05...
You may have a try to use osql utility.
The osql utility is a Microsoft® Win32® command prompt utility for ad hoc,
interactive execution of Transact-SQL statements and scripts. To use osql,
users must understand Transact-SQL.
The osql utility is typically used in these ways:
Users interactively enter Transact-SQL statements in a manner similar to
working on the command prompt. The results are displayed in the command
prompt window.
Users submit an osql job either specifying a single Transact-SQL statement
to execute or pointing the utility to a text file that contains
Transact-SQL statements to execute. The output is usually directed to a
text file, but it also can be displayed in the command prompt window.
The osql utility uses the ODBC database application programming interface
(API). It is a replacement for the isql command prompt utility based on the
DB-Library API. Both utilities are provided with Microsoft SQL Server. The
DB-Library API remains at a SQL Server 6.5 level; therefore, applications
that depend on DB-Library, such as isql, do not support some SQL Server
2000 features. For example, isql cannot access columns defined with the
ntext data type and truncates any char, varchar, nchar, or nvarchar columns
longer than 255 bytes. It also cannot retrieve results as XML documents.
Except for these limitations in isql, both osql and isql support the same
features.
HTH
Peter
Adam
"Mike Tissington" <mi...@oaklodge.com> wrote in message
news:#5R1nS04AHA.964@tkmsftngp03...
Since this seems to be a quite complex problem, I suggest you submit a new
for Microsoft PSS. You can reach PSS at
http://support.microsoft.com/support/webresponse.asp
A support professioanl will follow up with you soon after you have created
a case for the problem.
Peter