Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to store data in ORACLE table column of type SYS.URITYPE  RSS feed

 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to store data in a column of Oracle table using JDBC. The column is of SYS.URITYPE. I learned that to supply data to SYS.URITYPE from java, we need to use java.net.URL. I tried exactly same



but still i keep on getting this error :

java.sql.SQLException: ORA-00932: inconsistent datatypes: expected SYS.URITYPE got CHAR

Please help to fix this.

Thanks,
Suvojit
 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured out the solution with help from another forum. HTTPURIType is to be used in insert statement.

insert into table (uricolumn) values (HTTPURIType('http://www.oracle.com')) where actual URL is query parameter.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36621
474
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing! I had never heard of that type so I learned something new. I gave you a cow for that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!