SQL ERROR while executing the code java.sql.SQLException: ORA-01008: not all variables bound
Hi all
i'm getting the above error
plz tell me how to solve that error
the code snippet is as bellow
while(rst.next()){
con1=DriverManager.getConnection(url2,"rcxdev1","rcxdev1");
PreparedStatement pstmt=null;
pstmt=con1.prepareStatement(sb.toString());
for(int i=0;i<mp.size();i++){
if((mp.get(rst.getMetaData().getColumnLabel(i+1)).equals("NUMBER")))
{
pstmt.setInt(i+1,rst.getInt(i+1));
System.out.println("number "+i+" "+rst.getInt(i+1));
}
if((mp.get(rst.getMetaData().getColumnLabel(i+1)).equals("VARCHAR2")))
{
pstmt.setString(i+1,rst.getString(i+1));
System.out.println("char2 "+i+" "+rst.getString(i+1));
}
if((mp.get(rst.getMetaData().getColumnLabel(i+1)).equals("DATE")))
{
pstmt.setDate(i+1,rst.getDate(i+1));
System.out.println("date "+i+" "+rst.getDate(i+1));
}
if((mp.get(rst.getMetaData().getColumnLabel(i+1)).equals("CHAR")))
{
pstmt.setString(i+1,rst.getString(i+1));
System.out.println("char");
}
}
pstmt.executeUpdate(sb.toString());
pstmt.close();
}
con1.close();
}catch(Exception e){
e.printStackTrace();
}