aspose file tools*
The moose likes JDBC and the fly likes JDBC connection and sql server r2 arabic issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC connection and sql server r2 arabic issue" Watch "JDBC connection and sql server r2 arabic issue" New topic
Author

JDBC connection and sql server r2 arabic issue

Rita Chammas
Greenhorn

Joined: Dec 05, 2012
Posts: 1
Below is a description of our problem in using the JDBC connection to retrieve Arabic data from sql server 2008 r2 database in a powerbuilder 9 application.

Given:
1. powerbuilder 9 application
2. Sql server 2008 r2 database:
a. collation: Arabic_CI_AS
3. Microsoft JDBC driver
Problem:
We have an issue in retrieving/writing Arabic data to the database using JDBC connection inside powerbuilder 9 application.
Arabic Data is committed to the database using an ODBC connection correctly in the powerbuilder application; however we need to use JDBC connection to read the Arabic data but it is displayed as question marks (??? ???).
After research we have tried the below properties to solve the issue which none resolved it:
1. useUnicode=yes;
2. charSet=utf8; charSet=utf-8; charSet=windows1256; charSet=CP1256;
3. CodePageOverride=utf8; CodePageOverride=utf-8; CodePageOverride= windows1256; CodePageOverride= CP1256;
4. characterEncoding=UTF8; characterEncoding =utf-8; characterEncoding = windows1256; characterEncoding = CP1256;

• we can insert/retrieve Arabic data through an ODBC connection succesfully.
• We have queried the data in SQL Server Management Studio: • If the data is inserted using a JDBC connection the query will retrieve ‘??? ???’
• If the data is inserted using an ODBC connection, and retrieved using a JDBC connection it will be ‘??? ???’



It is sure that the font used in PB can display Arabic characters properly. we have tried to read Arabic characters from a string successfully.


Your PROMPT help is much appreciated ASAP.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JDBC connection and sql server r2 arabic issue