Select to view content in your preferred language

SeRow setClob Method

817
4
01-21-2011 05:47 AM
JasonPiasecki
Emerging Contributor
I'm using the Java API and attempting to call SeRow's setClob method while inserting a new row in a table in an Oracle 9i database, but I'm having issues.  The text that appears in the table is unreadable either in ArcMap or in SQL*Plus.  There is definitely something there, but it all shows up as upside-down question marks.  I would guess this to be an encoding issue, but I'm not sure how to proceed.  I've tried specifying an ASCII encoding in the String.getBytes method that I'm using to generate the ByteArrayInputStream that gets passed to setClob(), but it doesn't seem to make any difference.  The database NLS_CHARACTERSET is WE8ISO8859P15.  Any assistance or tips that anyone can provide would be greatly appreciated.
0 Kudos
4 Replies
VinceAngelo
Esri Esteemed Contributor
What version and service pack are using for ArcSDE Server, ArcGIS Desktop, and the
ArcSDE API?

A SE_CLOB_TYPE is just a larger-than-VARCHAR string type.  Does a subset of your string
properly encode in a SE_STRING_TYPE column?  If not, then you'll need to work through
character set issues first.  I only use AL32UTF8 character set, just in case I need to store
non-ASCII7 data.

- V
0 Kudos
JasonPiasecki
Emerging Contributor
ArcDesktop: 9.3 Service Pack 1
ArcSDE API: 9.2
ArcSDE Server: 9.2

I have been storing a subset of the string in a VARCHAR2 column and it stores just fine, displays just fine in ArcMap.  If I bypass the SDE API and update the record using an Oracle Clob with setAsciiStream(), it also turns out OK, but I'd rather not do that, we'd like to go through SDE for everything.  Thanks for your time.
0 Kudos
VinceAngelo
Esri Esteemed Contributor
CLOB support was relatively immature at 9.2, especially before the first few service packs.
You probably want to try using a modern client (ideally, 9.3.1sp2) with the older server,
just to see if the Java API works with CLOBs at all (if not try again with a 9.3 instance).
I load CLOBs in 9.3.1 servers all the time with the 'C' API, but don't have much reason
to use Java.

- V
0 Kudos
JasonPiasecki
Emerging Contributor
Good to know.  We're actually in the process of migrating to a new DB/ArcSDE server, so I'll give it a try on that machine in a few days.  I'll update this thread at that time just in case there's someone else out there with a similiar problem someday.  Thanks very much for your advice.
0 Kudos