hello sir,
I have never worked with DB2 before.I am facing a problem with updation of row in DB2.The following piece of code is not working in DB2...but works fine for MSAccess and Oracle.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con1=DriverManager.getConnection ("jdbc

dbc:tgmc","db2admin","laptop");
Statement stmt1 = con1.createStatement(ResultSet.TYPE_SCROLL_SENSITI VE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt1.executeQuery("select * from \"GAURAV SRIVASTAVA\".form");
while(rs.next())
{
int f_id=rs.getInt("form_id");
if(f_id==11)
{
rs.updateString("status","ri");//here is the problem
rs.updateRow();
}
}
con1.close();
The above code throws NullPointerExecption as follows::
java.lang.NullPointerException
sun.jdbc.odbc.JdbcOdbcBoundCol.setRowValues(Unknow n Source)
sun.jdbc.odbc.JdbcOdbcResultSet.updateBytes(Unknow n Source)
sun.jdbc.odbc.JdbcOdbcResultSet.updateString(Unkno wn Source)
sun.jdbc.odbc.JdbcOdbcResultSet.updateString(Unkno wn Source)
org.apache.jsp.app_005fnf_jsp._jspService(app_005f nf_jsp.java:67)
org.apache.jasper****ntime.HttpJspBase.service(Http JspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
Can you help me with this error??? Or can you suggest me an appropiate method for performing the task