This discussion is archived
1 Reply Latest reply: Sep 6, 2009 2:25 PM by 843810 RSS

storing and retrieving arabic in SQL Server 2000

843810 Newbie
Currently Being Moderated
hello, i realize this problem has been posted lots before but i read in the forum and i couldn't find a solution to fix my problem
i am developing a desktop application in java and sql server 2000, and i'm using JBuilder for writing my java codes

here's the problem

i can MANUALLY store arabic text in my database (directly in SQL Sever Query Analyzer) and can read it in arabic properly in SQL Server, but if i want to retrieve the arabic text in a query in JAVA, for example:
select * from person
i see weird characters (not question marks) but not the original arabic text

and if i type arabic text in a java textfield and use the value entered in an sql query, for example:
sqlQuery = "insert into person (fname) values ('" + jtfFName.getText() + "')";
it is inserted in SQL Server as ?????s and when i retrieve the values from the table i also see it as ?????s

even when i converted all the data types in the database to unicode data types (*nchar* instead of char and nvarchar instead of varchar) and modified the sql query to the following:
sqlQuery = "insert into person (fname) values (N'" + jtfFName.getText() + "')";
(N outside the single quotation mark since according to rules on msdn)
it still didn't solve the problem

please i need urgent help with this issue!