Skip to Main Content
  • Questions
  • Garbage question mark appear from time to time when insert clob via jdbc

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Nir.

Asked: February 07, 2018 - 1:48 pm UTC

Last updated: February 08, 2018 - 2:52 am UTC

Version: Oracle 12.1

Viewed 1000+ times

You Asked

Hello,

We are using JAVA JRE 5 and we add rows using jdbc thin client that connect to 12.1 server
We call a store procedure.

The problem was also ocurred when we used oci driver and in previous servers 10.xxx

We found that when we insert a new row the data in the clob column have from time to time (relativly rare) a few question marks (usually one) - the data that is store in the clob is mainly in hebrew, but sometimes in english.

What do you recommend us to check?

Regards
Nir

and Connor said...

You have a characterset issue/conflict between client and database.

For example, lets say my database only accepts the letters A to Z.

If you try insert the number "1", we will *allow* that to be inserted. But of course, we can't transpose that to "A" or "Z". It is invalid data for what my database can handle. So you'll see it come back as garbled or the famous upside down question mark.

Your database has to be able to accommodate a superset of characters from the various characterset data that clients may present to it.

My opinion is that every database nowadays should be created as to accommodate UTF8 (AL32UTF8). That is why it is the default in Oracle 12.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database