This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes create a temporary table on postgres using statement.executeUpdate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "create a temporary table on postgres using statement.executeUpdate" Watch "create a temporary table on postgres using statement.executeUpdate" New topic
Author

create a temporary table on postgres using statement.executeUpdate

Fernando Guerrero
Greenhorn

Joined: Apr 26, 2011
Posts: 14

Hello

I am using statement.executeUpdate to create a temporary table on a postgres server (postgres 9). When I run my program on Eclipse everything works fine, the tables are created and the tables have the right data, also executeUpdate returns 0, which is the right value to be returned when a table is created (regardless of how many rows are inserted in the table ), according with the documentation .
But when I run my program in my terminal (CentOS 5) the tables are created, the tables have the right data (everything looks fine), but executeUpdate returns me 1, I have not idea why I am getting 1, it should be zero , and it cannot be the number of rows inserted because 5 rows are inserted, so where is this 1 coming from??

Thanks in advance.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: create a temporary table on postgres using statement.executeUpdate
 
It's not a secret anymore!