Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Problem with executeUpdate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem with executeUpdate" Watch "Problem with executeUpdate" New topic
Author

Problem with executeUpdate

beda meda
Greenhorn

Joined: Jul 15, 2010
Posts: 6
Hi all,

I have this sql:
CREATE DOMAIN TYPE_TIME_ZONE_ID AS VARCHAR(40);
ALTER TABLE MAIN_HEADER ADD TIME_ZONE_ID TYPE_TIME_ZONE_ID DEFAULT 'Europe/Berlin' NOT NULL;

There are already data in table, so I want to add new column (not nullable) and set it's value to "Europe/Berlin" for all exsiting rows. If I run this directly in IB Expert, everything is OK. But when I run this from java using executeUpdate, the value in column is only "Eur". I can't figure out, why it is cut like this. Executed directly in database it works, so I suspect some problem between java and db. Or am I completely wrong and problem is somewhere else?

Thanks for any idea.
Carlo Moore
Greenhorn

Joined: Aug 02, 2005
Posts: 27
I would recommend printing the SQL from java before the executeUpdate is run, then running that SQL against IB.

Maybe post your java code so we can have a better idea of what's going on.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with executeUpdate