var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Inserting/Retrieving Cyrillic Characters
I am using Microsoft SQL Server 2000. I am inserting cyrillic characters in my table by using query analyzer. See sample below:
Column "LangText" is nvarchar data type.
INSERT INTO Sentences (LangText) VALUES ('Поиск')
Problem occurs when I retrieve via query analyzer by using select statement I got "?????" question marks.
I think you need:
(Note the "N" qualifier on the constant)
INSERT INTO Sentences (LangText) VALUES (N'Поиск')
Its working fine with "N" qualifier but only for inline queries. How can I use this with stored procedure?
You might need to be a little more specific - basically it just works:
or if you need to construct the argument:
CREATE PROC spInsIntoSentences(@str nvarchar(20)) as
INSERT INTO Sentences (LangText) VALUES (@str)
EXEC spInsIntoSentences N'Поиск'
DECLARE @text nvarchar(20)
SET @text = N'Поиск' + N'Поиск'
EXEC spInsIntoSentences @text
I am calling stored procedure from ASP.NET web application and filling the values of parameters from TextBoxes, so which place I should write "N" qualifier? See my stored procedure below:
CREATE PROCEDURE AddSentence
IF EXISTS(SELECT TextID FROM Sentences WHERE LangText = @LangText)
INSERT INTO Sentences (LangText, MoreText) VALUES (@LangText, @MoreText)
Depends on what the call to the stored procedure looks like - should be something like:
Presumably you're constructing this in the ASP code. It does depend on the controls you're using being Unicode-capable, which I would presume the ASP.NET textbox is (although I'm not familiar with it).
AddSentence N'Поиск', N'...'
Thanks for your help. I done it with ASP.NET with stored procedure.