Bugs item #1837205, was opened at 2007-11-23 17:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474851&aid=1837205&group_id=54790

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: UserAcc (useracc)
Assigned to: Nobody/Anonymous (nobody)
Summary: <sql> truncates data

Initial Comment:
I have a .sql file (attached to this message) :

BEGIN TRANSACTION

INSERT INTO [dbo].[Currency] ([CurrencyID], [CurrencyCode], [CurrencyName], 
[CurrencySymbol], [CurrencyDec]) VALUES (93, 'MNT', 'MONGOLIAN TUGRIK', N'$', 2)
COMMIT TRANSACTION

when I try to execute <sql> with this file I get an error:

[loadtasks] Scanning assembly "NAnt.Contrib.Tasks" for extensions.
      [sql] SQL Error: Incorrect syntax near 'MON'.
      [sql] Unclosed quotation mark after the character string 'MON'.
      [sql] Statement: BEGIN TRANSACTION
      [sql] INSERT INTO [dbo].[Currency] ([CurrencyID], [CurrencyCode], 
[CurrencyName], [CurrencySymbol], [CurrencyDec]) VALUES (93, 'MNT', 'MON

BUILD FAILED - 2 non-fatal error(s), 0 warning(s)


If I remove "G" from "MONGOLIAN" the <sql> executes with no errors.

Another statement that does not execute:

INSERT INTO [dbo].[Currency] ([CurrencyID], [CurrencyCode], [CurrencyName], 
[CurrencySymbol], [CurrencyDec]) VALUES (59, 'HTG', 'HAITI GOURDE', N'$', 2)

again, if I remove the second "G", it works fine

here is my script:
 <target name="c">
        <loadtasks assembly="${nantcontrib.dir}/NAnt.Contrib.Tasks.dll" />
        <sql connstring="Provider=SQLOLEDB;Data Source=${srv.name};Initial 
Catalog=${db.name};${sql.logon}" delimiter="GO" delimstyle="Normal" 
source="${branch.dir}/Database/SQLData.sql" batch="false" />
    </target>



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474851&aid=1837205&group_id=54790

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAntContrib-Developer mailing list
NAntContrib-Developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to