<div>Hi </div> <div> </div> <div>when i execute the below code</div> <div> </div> <div>if(userrole_prefix!=null)<BR> { <BR> int length = userrole_prefix.length;<BR> System.out.println("**************start of query");<BR> qry = <FONT color=#2a00ff size=2>select</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>s_2090_1_user.currval</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>from</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>dual;</div> <div></FONT><BR> logger.info(qry);<BR> result=pStmt.executeQuery(qry);<BR> System.out.println("**************Query
execution");<BR> while(result.next())<BR> {<BR> userid = result.getString(1);<BR> }<BR> System.out.println("User id:1:***********"+userid);<BR> qry = <FONT color=#2a00ff size=2>insert</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>into</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>ppsr_user_prop_mst</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>(user_prop_mst_id,prop_id,userid)</FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>values(user_prop_mst_seq.nextval,?,?)</FONT>;<BR> for(int i=0;i<length;i++)<BR> {<BR> System.out.println("The propositions
are:"+userrole_prefix[i]);<BR> System.out.println("User id"+userid);<BR> pStmt = conn.getConnection().prepareStatement(qry);<BR> pStmt.setInt(1, Integer.parseInt(userrole_prefix[i]));<BR> pStmt.setInt(2, Integer.parseInt(userid));<BR> pStmt.execute(qry);<BR> <BR> }<BR> <BR> } </div> <div> </div> <div>i get bind variable does not exist exception.</div> <div>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.</div>
<div> </div> <div>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.</div> <div> </div> <div>Please help in getting this fixed.</div> <div> </div> <div>Thanks & Regards,</div> <div>Vasudha</div><p>
        
        
                <hr size=1></hr>
Find out what India is talking about on - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers India</a> <BR>
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. <a href="http://us.rd.yahoo.com/mail/in/messengertagline/*http://in.messenger.yahoo.com">Get it NOW</a><p> 
        
        
                <hr size=1></hr>
Find out what India is talking about on - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers India</a> <BR>
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. <a href="http://us.rd.yahoo.com/mail/in/messengertagline/*http://in.messenger.yahoo.com">Get it NOW</a>