Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to pass space to the database

 
Arulkumar Gopalan
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We don't have the data in xml for some not null columns. So we are getting the exception as 'null can not be inserted'. Then we decided to send spaces from the xml. but the parser throws null pointer exception.
How to send the spaces to the database.. ? any special tags are there?
we tried to use  . but it updates the database with '?'
Pls let me know if there is any solution for this.
Thanks.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What tools/products are you using? In general, this sounds like a question for that particular vendor's forums.
 
Arulkumar Gopalan
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The proble is something like this.
We are inersting rows into a table where all the fields are not null. Since we don't have data for some columns in our xml, we have to update with spaces. For example see below.
<attribute1>name</attribute1>
<attribute2>empno</attribute2>
<attribute3></attribute3>
Here we don't have data for attribute3 in the xml tag. but attribute3 in the table is not null field. So we have to pass some value in the xml for attribute3. We are trying to send spaces. but if we give space the parser trims it and sends null to the database. so we are not able to update the attribute3 with spaces. Hope now the problem is clear. Any help regarding this is appreicated.
we are using Oracle xml parser.
Thanks.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you written the XML-to-whatever code yourself (with SAX or DOM) or is it some Oracle utility that does this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic