ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Munat <b...@munat.com>
Subject can't update/insert to postgres db
Date Tue, 27 Sep 2005 00:57:22 GMT
Hello. I can't seem to update or insert into a postgres db from ibatis. I don't get an exception,
but when I check the 
database the change has not been made. I've tried various insert and update statements with
and without parameters and 
none have worked. However, I am selecting data from this db with ibatis just fine.

Here's some code I'm using:

Reader reader = Resources.getResourceAsReader("sqlMap-config.xml");
SqlClient sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
int result = sqlMap.update("updateEmail",user);

And from the sqlMap xml file:

<statement id="updateEmail">
     update user set email = 'buzz@boobah.com'

(note: I had a where clause there but I'm trying to get it to do anything at this point!)

I've also tried the "update" and "insert" sqlmap xml elements... and tried inserting updating
other tables too. And when 
I run the exact same sql from a jdbc ui client, the database is updated sucessfully.

Any ideas much appreciated.


View raw message