views:

31

answers:

1

Inserting multilingual data into a SQL 2008 database (nvarchar field) I notice that it seems to lose some special character marks.

e.g.

    INSERT INTO [dbName].[dbo].[tbl_Question_i18n]  
           ([QuestionId]  
           ,[LanguageId]  
           ,[QuestionText])  
     VALUES  
           (@lastinsertedquestionid  
           ,@romanian  
           ,'Număr unic de referinţă (URN)')  

gets inserted as 'Numar unic de referinta (URN)'

although if I do 'Edit top 200 rows' I can paste the same text directly into that field with no problem.

What am I missing, please?

+4  A: 
INSERT INTO [dbName].[dbo].[tbl_Question_i18n]  
       ([QuestionId]  
       ,[LanguageId]  
       ,[QuestionText])  
 VALUES  
       (@lastinsertedquestionid  
       ,@romanian  
       ,N'Număr unic de referinţă (URN)')

You need the N before the string constant to make it Unicode

gbn
@gbndoh! thank you - you are a legend! i am a spanner!
zombiejojo