I always get the error "
insufficient data left in message" running a prepared statement via jdbc executeQuery
the java statement
"ResultSet rs = this.updateStatement.executeQuery();"
results in the following error message :
java.sql.SQLException: ERROR: insufficient data left in message.
the insert statement is
INSERT INTO person.person (id, lastName, readOnly, birthDay, firstName) VALUES(DEFAULT,?,?,?,?) RETURNING id
the server LOG file says the following
2008-04-29 00:15:24 CEST ERROR: insufficient data left in message
2008-04-29 00:15:24 CEST STATEMENT: INSERT INTO person.person (id, lastName, readOnly, birthDay, firstName) VALUES(DEFAULT,$1,$2,$3,$4) RETURNING id
2008-04-29 00:15:24 CEST LOG: could not receive data from client: Connection reset by peer
i also tried this statement via the psql command line and it worked. there is also a similar update statement that works perfect
###
ResultSet rs = this.updateStatement.executeQuery();
// and the record is updated
// log
2008-04-29 00:34:45 CEST LOG: could not receive data from client: Connection reset by peer
2008-04-29 00:34:45 CEST LOG: unexpected EOF on client connection
###
i am using Postgres 8.2 and jdbc 3.0 for 8.2 (i also tried it with jdbc 4.0 but it did not work either).
i have no idea what the problem is - can someone help me ?
regards sepp
Hohe Telefonrechnungen? Gratis Gespräche von PC zu PC - unlimitiert mit dem Windows Live Messenger.
Hier klicken!