开发者

Why Oracle objects return "???" for every text attribute?

I wrote a procedure returning a plain object, having all the attributes declared as VARCHAR2. My java code, after executing the procedure, read these objectes and all I see is three question marks "???" instead of text. It seems it may be an NLS_LANG problem, but I'm not really sure.

Is开发者_如何学运维 this an NLS_LANG problem? How can I resolve this?

NOTE: The Java 1.5 app is querying a Oracle 10g DB.


When using international characters with Oracle object types, you need to include the orai18n.jar which can be downloaded at the same place as the driver itself.

From the driver's readme file:

orai18n.jar: It contains classes for NLS support in Oracle Object and Collection types.


Seems like unicode issue, try getting your Database Character Set by:

Select value from SYS.NLS_DATABASE_PARAMETERS where PARAMETER = 'NLS_CHARACTERSET'

Should the problem still exist i suggest you take a look at Unicode support with Oracle

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜