Hi Phil,
Sorry for the delay to answer to your question, I wasn't in the office.
I am using your code example (XpagesJDBC.nsf) with the new configuration to work with the postgress db.
The insert and update technique in the JDBC_AtFunctions.xsp works with no problem as you because it doesn’t use the same code (just to point out this part is working with the same db configuration)
The issue comes when I use the JDBC_RowSetDatasource.xsp
Since I had the exception and the error message was saying I have to enable the Auto commit then I thought if I add the following two lines of code then it will solve my issue but I get the same exception with or without my changes.
The update and insert in the db is work but I get the exception after wards.
public Connection getConnection() throws SQLException {
if(connection==null) {
connection = JdbcUtil.getConnection(FacesContext.getCurrentInstance(),connectionName);
// CY 30.10.2011 enable commit
// connection.setReadOnly(false);
// connection.setAutoCommit(true);
}
return connection;
}
The postgres drive used in my code
postgresql-9.0-801.jdbc4.jar
I have changed the following configuration :
Old derby1.jdbc
org.apache.derby.jdbc.EmbeddedDriver
jdbc:derby:${rcp.data}\derby\XPagesJDBC;create=true
phil
phil
New postgres.jdbc
org.postgresql.Driver
jdbc:postgresql://test.wsl.ch:5432/intranetdb_test
postgres
test
from the JDBC_RowSetDatasource.xsp
<xp:this.data>
<xe:jdbcRowSet connectionName="postgres" var="jdbcData1"
sqlTable="ressystem.users" showDeleted="true">
xe:jdbcRowSet>
xp:this.data>