File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
Similar Threads
-Duser.timezone
Windows SBS 2008 and timezone (DST) problem in Europe/Berlin
Adding two Strings in JSP
what is difference between JDBC1 and JDBC2 ?
Inserting into tables connected by a many-to-many relationship