gdlp2004
asked on
Cursor State Not Valid
I am using the following result set and prepared statement. The update query works, but the a "CURSOR STATE NOT VALID"
exception occurs and the rest of my code is ignore. Thanks in advance to anyone that can help.
String updateDb2Query = "UPDATE tstdtatst.A767040A set ORCPDT = '"+bReqCompDate+"', ORFL = '"+flag+"', ORACTN = '"+action+"', ORFIH = "+frontInsideHeight+",ORRI H = "+rearInsideHeight+",ORFLR T="+floorR ate+",ORLN ID="+lineS plit+", ORDATE='yyyy-mm-dd',ORGDTE ='yyyy-mm- dd', ORTPRC="+bTotal+", ORTCST="+bTotalCost+", ORTMRG="+bTotalMargin+", ORQTY="+bTotalQty+",ORMODL ='"+bModel +"',ORCO=' "+bPlant+" ',ORSLSF=' "+salesfna me+"', ORSLSL='"+saleslname+"', ORCUST="+customerJdeNum+", ORPRCD='"+productCode+"',O RDAUT='"+d iscountNum ber+"',ORU SER='"+sal esmanId+"' where ORGORN = "+oracleId+"";
pUpdateDb2Query = db2.prepareStatement(updat eDb2Query, ResultSet.TYPE_SCROLL_INSE NSITIVE, ResultSet.CONCUR_READ_ONLY );
rsUpdateDb2Query = pUpdateDb2Query.executeQue ry();
rsUpdateDb2Query.close(); pUpdateDb2Query.close();
exception occurs and the rest of my code is ignore. Thanks in advance to anyone that can help.
String updateDb2Query = "UPDATE tstdtatst.A767040A set ORCPDT = '"+bReqCompDate+"', ORFL = '"+flag+"', ORACTN = '"+action+"', ORFIH = "+frontInsideHeight+",ORRI
pUpdateDb2Query = db2.prepareStatement(updat
rsUpdateDb2Query = pUpdateDb2Query.executeQue
rsUpdateDb2Query.close(); pUpdateDb2Query.close();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER