Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting records into tables using Unicode

Status
Not open for further replies.

yaakov

Technical User
Oct 18, 2000
9
IL
Hello!

I insert into table some records. I wrote it in Hebrew. When i retrieve it i got question marks. I understand that i have to use unicode but how?

The INSERT code was

INSERT INTO table_name (field1,field2)
VALUES ('value1 in Hebrew','value2 in Hebrew')


The result to the query "SELECT * FROM table_name"
was field1 field2
????? ??????

Thank you
Yaakov from Israel
 
Hi Yaakov from Israel,

What code page and unicode collation are you using on the server (I'm assuming you are using SQL Server 7.0).

Also, you should use N in front of the quote to force a string literal to unicode:
INSERT INTO table_name (field1,field2)
VALUES (N'value1 in Hebrew',N'value2 in Hebrew') -- note the N

Hope this helps.. let me know...
Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top