Anders,
 
Unfortunately, I don't know much about Danish characters. Is there an encoding (like > for > ) which you could use? If so, give that a try.
 
Regards,
Richard


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anders Olsen
Sent: Thursday, October 05, 2006 05:01
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] SQL task and file encoding

Hello fellow NAnt users
 
We are using NAnt to deploy our database. Now we would also like to use it to insert some data in the database. We are trying to use the sql-task from NAntContrib to execute our script.
 
Our script contains data written using Danish characters (like øæå), but these characters are not handled correctly by NAnt - they are not inserted into the database.
 
We use the following task definition to start the sql-task:
  <sql
    connstring="Provider=SQLOLEDB;Data Source=<source>; Initial Catalog=DPSData; Integrated Security=SSPI"
    transaction="true"
    delimiter="GO"
    delimstyle="Line"
    print="true"
    batch="false"
    source="${project.basedir}\..\DataBase\Database\Change Scripts\Data_Insert.sql"
  />
 
Part of the Data_Insert.sql script looks like this:
---
/* ActorType */

INSERT INTO [DPSData].[dbo].[ActorType] ([TypeName]) VALUES ('TSO')
INSERT INTO [DPSData].[dbo].[ActorType] ([TypeName]) VALUES ('Handelsbalanceansvarlig')
INSERT INTO [DPSData].[dbo].[ActorType] ([TypeName]) VALUES ('Produktionsbalanceansvarlig')
INSERT INTO [DPSData].[dbo].[ActorType] ([TypeName]) VALUES ('Forbrugsbalanceansvarlig')
INSERT INTO [DPSData].[dbo].[ActorType] ([TypeName]) VALUES ('Netoperatør')
INSERT INTO [DPSData].[dbo].[ActorType] ([TypeName]) VALUES ('Producent')
go

---
All values are inserted into the database, except that the 'ø' in 'Netoperatør' is missing.
 
When we run the script using Microsoft SQL Server Management Studio, there is no problem.
 
How do I tell NAnt or the sql-task to handle the danish characters correctly?

--
Regards

Anders KÃ¥re Olsen



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Peek Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to