Hello. I posted the same topic yesterday and didn't receive any replies. I've tried to be more specific and hopefully someone can help me. I'm having a problem editing data in a database file on my AS400. I have an application server set up on the same machine and I've created a data source to access the files in my library. The provider is "DB2 for OS400 V5R1
JDBC Provider", the database name is "*LOCAL" and the library name is correct. I can use a SELECT statement with the data source without issue, but when I try UPDATE, DELETE OR INSERT, I get an error message.
This is my code to access the file:
This is my code to delete a record:
Thanks in advance for your help. I appreciate it. I've listed the error from error log below:
com.ibm.db2.jdbc.app.DB2DBException: <fileName> in <libraryName> not valid for operation.
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.db2.jdbc.app.DB2DBException.<init>(DB2DBException.java:47)
at com.ibm.db2.jdbc.app.DB2PreparedStatementRuntimeIm pl.SQLExecute(Native Method)
at com.ibm.db2.jdbc.app.DB2PreparedStatementRuntimeIm pl.execute(DB2PreparedStatementRuntimeImpl.java:23 6)
at com.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java:1822)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. execute(WSJdbcPreparedStatement.java:400)
at PresentationEdit.doPost(PresentationEdit.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInsta nce.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.s ervice(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.se rvice(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletRefere nceState.dispatch(ValidServletReferenceState.java: 42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceRef erence.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.handleWebAppDispatch(WebAppRequestDispatcher. java:1038)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.dispatch(WebAppRequestDispatcher.java:603)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.forward(WebAppRequestDispatcher.java:204)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForwar d(WebAppInvoker.java:125)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleIn vocationHook(WebAppInvoker.java:286)
at com.ibm.ws.webcontainer.cache.invocation.CachedInv ocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcesso r.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDis patcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handle Request(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleReques t(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection. java:449)