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"
/>
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 */
/* 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
------------------------------------------------------------------------- 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