• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Control character when retrieving a field from an Oracle Array

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am connecting to an Oracle 9i DB using a web service and fetching data to populate and XML file. The server used here is WAS 6.1.
There seems to be an issue with the value returned from a VARCHAR2 field. The data in this field has an asterisk(*).

We have a separate application calling this field and we get the value on the screen as ERROR*. When we directly call the query to the DB we get the value back correctly as ERROR*.

The webservice gets the record as an array from a stored procedure.
The error:
We are getting all the values correctly, except the value with the *. the value being returned here is 'ERROR'(without the quotes). There seems to be a control character at the end. When we put it in in the XML and do a system.out we can see the character showing up as ERROR& #25 (without the space in between, this is getting translated here on the screen).

We are using WSJdbcUtil.getNativeConnection method to get the array back from the stored procedure. Everything except this is working fine. And due to this charater, the XML validation fails.

Thanks in advance!

[ August 21, 2008: Message edited by: Ben George ]

[ August 21, 2008: Message edited by: Ben George ]

[ August 21, 2008: Message edited by: Ben George ]
[ August 21, 2008: Message edited by: Ben George ]
 
Marshal
Posts: 80740
485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you worked out what 25 is? You go to Unicode and search for "basic Latin" and open that and look for 19 (hex for 25). And you find EM which is end-of-medium.
You may be able to parse the chars in Java and get it to print 19, which is also (I think ctrl-Y).

That is as far as I know, but try googling for end-of-medium and see whether you get anything useful (as opposed to 9435983759 sites about ouija boards ).
 
Ben George
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The cause for my confusion is why are we getting the asterisk converted to the EM character? Is this something to do with the table data type of Oracle being wrapped in the WebSphere Connection object and then unwrapped for the data? Because I cannot see anywhere else in the flow where this gets converted.
 
Campbell Ritchie
Marshal
Posts: 80740
485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know . . .

Anybody else?
 
Sheriff
Posts: 28408
101
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

We are using WSJdbcUtil.getNativeConnection method to get the array back from the stored procedure.

Something is not doing its job right, somewhere in there. I would start by looking at the stored procedure and at that WSJdbcUtil class.

I've seen other posts in the past asking how to get rid of control characters from XML coming from a database, but I don't remember if the problem was Oracle-specific or not.
 
reply
    Bookmark Topic Watch Topic
  • New Topic