[ 
https://issues.apache.org/jira/browse/DBUTILS-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15523909#comment-15523909
 ] 

Kaleb Akalework commented on DBUTILS-130:
-----------------------------------------

Can somebody please help me with this? It is very urgent.

> QueryRunner cannot correctly insert unicode characters in Oracle Database. 
> ---------------------------------------------------------------------------
>
>                 Key: DBUTILS-130
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-130
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: Kaleb Akalework
>            Priority: Critical
>
> I have used queryRunner to insert unicode characters succesfully in MSSQL and 
> IBM DB2. I was not able to successfully insert unicode into Oracle. Instead I 
> see the reversed questions mark are inserted, in place of the acutal data. 
> This is the code. The below code works fine If I'm using SQL Server 2016 or 
> IBM DB2 10.5. 
>       
> Here is a sample java code I'm using. The followoing code works perfectly if 
> executed against SQL Server database. 
> to create the table use create table TEST (test NCLOB) 
> private Object[][] getBulkWriteParams() throws SQLException{ 
> List<Object[]> listOfParams = new ArrayList<>(); 
> String s = "こんにちは"; 
> //for(ContentEntry ce:cacheOfExtractedPages){ 
> try{ 
> listOfParams.add(new Object []{s}); 
> } 
> catch(Exception e){ 
> int i= 1; 
> } 
> //} 
> return listOfParams.toArray(new Object[0][0]); 
> } 
> public void insertQueryRunner(){ 
> String s = "こんにちは"; 
> String SQL = "insert into TEST VALUES( ?)"; 
> try{ 
> new QueryRunner().batch(connection, SQL, getBulkWriteParams()); 
> }catch(Exception e){} 
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to