[DB-SIG] reg bind variable does not exist exception

Vasu dha victory_vasudha at yahoo.co.in
Mon Sep 11 10:53:09 CEST 2006


Hi 
   
  when i execute the below code
   
  if(userrole_prefix!=null)
     { 
      int length = userrole_prefix.length;
      System.out.println("**************start of query");
      qry = select s_2090_1_user.currval from dual;
  
      logger.info(qry);
      result=pStmt.executeQuery(qry);
      System.out.println("**************Query execution");
      while(result.next())
      {
       userid = result.getString(1);
      }
      System.out.println("User id:1:***********"+userid);
      qry = insert into ppsr_user_prop_mst (user_prop_mst_id,prop_id,userid) values(user_prop_mst_seq.nextval,?,?);
      for(int i=0;i<length;i++)
      {
       System.out.println("The propositions are:"+userrole_prefix[i]);
       System.out.println("User id"+userid);
       pStmt = conn.getConnection().prepareStatement(qry);
       pStmt.setInt(1, Integer.parseInt(userrole_prefix[i]));
       pStmt.setInt(2, Integer.parseInt(userid));
       pStmt.execute(qry);
       
      }
       
     } 
   
  i get bind variable does not exist exception.
  with the SOP given in the code block, the  System.out.println("**************start of query"); gets executed. The first query just gets the user-id and this user id is given as an input to another query that is inserted into another table.
   
  I have declared the connection, result set and all others in the beginning of the method. Its too big n hence not put up here.
   
  Please help in getting this fixed.
   
  Thanks & Regards,
  Vasudha

 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/db-sig/attachments/20060911/091117fd/attachment.htm 


More information about the DB-SIG mailing list