When running the <sql /> task, it is always runs in verbose mode.  I
have tried the following to turn it off, but without success:

   - Added a verbose property: <property name="verbose" value="-" />.
   - Used command line options (nant -v-, nant -verbose-).
   - Specifying "false" for the print attribute.
   - Specifying a log file for the output attribute.

To duplicate:
1) On a computer that has SQL Server 2000 installed, save the following
xml as 
   database.build.
      <project name="build" default="build">
         <property name="DB-Name"            
            value="OutputTest" />
         <property name="Server-Connection"  
            value="Provider=SQLOLEDB; Data Source=localhost; Integrated
Security=SSPI;" />

         <!-- Execute a SQL script. -->
         <target name="build">
            <sql
               connstring="${Server-Connection}"
               transaction="true"
               delimiter=";"
               delimstyle="Line">
                  CREATE DATABASE ${DB-Name};
            </sql>
         </target>
      </project>

2) Open a command prompt and CD to the directory where you saved 
   database.build.

3) Run nant.

4) Note that the following verbose output is printed it shouldn't be:
SQL Task:
Connection String: Provider=SQLOLEDB;Data Source=localhost; Integrated
Security=SSPI;
Use Transaction?: True
Batch Sql Statements?: True
Batch Delimiter: ;
Delimiter Style: Line
Fail On Error?: True
Source script file:
Output file:

SQL Statement:
                         CREATE DATABASE OutputTest;

Note: You should also be able to run this against any database that is
supported by .NET by simply substituting your own connection string for
Server-Connection property.

     <:> Aaron Jensen
     <:> [EMAIL PROTECTED]
     <:> 800.237.6335 ext 421
     <:> Financial Profiles
     <:> www.profiles.com


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to