This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Regarding insertion in postgresql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Regarding insertion in postgresql" Watch "Regarding insertion in postgresql" New topic
Author

Regarding insertion in postgresql

Sreejith Padmanabhan
Greenhorn

Joined: Oct 10, 2007
Posts: 10
Dear all,
I am facing a problem. I would like to know how to insert a xml value in the database using java program.

The sample code is given below :-


The code works fine with mysql, but when i am executing the same with postgresql, it gives me a error, like

Exception: Bad value for type long : hi dears
org.postgresql.util.PSQLException: Bad value for type long : hi dears
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toLong(AbstractJdbc2ResultSet.java:2736)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getLong(AbstractJdbc2ResultSet.java:2032)
at org.postgresql.jdbc3.Jdbc3ResultSet.getClob(Jdbc3ResultSet.java:43)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getClob(AbstractJdbc2ResultSet.java:386)
at MySqlClobSetClob.main(MySqlClobSetClob.java:36)



Awaiting the reply in this regards,


regards,

Sreejith Padmanabhan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding insertion in postgresql
 
Similar Threads
how to set the beans object into an arraylist
resultset next() returns false and yet record(s) exist
which session listner to be impletement
Regarding insertion in postgresql
help me in improving performance of prepared statement