Hi to All


         public void updateInfo(IbatisBooksForm form) {


                int i = 0;

                try {
                        
                        int bookid=form.getPrimaryKey();
                        
                        HashMap map = new HashMap();
                          
                          map.put("bookid",new Integer(form.getPrimaryKey()));
                          
                          System.out.println("the bookid value"+bookid);
                        
                         // sqlMap.queryForPaginatedList("updateAccount",new
Integer(form.getPrimaryKey()),map);
                          
sqlMap.queryForList("updateAccount",new Integer(form.getPrimaryKey()) );
                        System.out.print("the ibatis program 7");
                        
                        String author = form.getAuthorname();

                        String bookname = form.getBookname();

                        String available = form.getAvailablebooks();

                        String publisher = form.getPublisher();

                        String category = form.getCategory();
                        
                        
                        form.setBookname(bookname);
                        form.setAuthorname(author);
                        form.setAvailablebooks(available);
                        form.setPublisher(publisher);
                        form.setCategory(category);
                //      form.setPrimaryKey(form.getPrimaryKey());

                        
                        
                i = sqlMap.update("updateAccount",form );

                } catch (SQLException e) {


                e.printStackTrace();

                
                }

                

                }


For this sql query is

<update id="updateAccount"  parameterClass="booksform">


update IBATISADMINBOOK set BOOKNAME = #bookname#,

AUTHORNAME  =#authorname#,

AVAILABLEBOOKS=#availablebooks#,

PUBLISHER=#publisher#,

CATEGORY=#category#


 where BOOKID =?

</update>


<parameterMap id="update"   class="java.util.HashMap">
  
  
 <parameter property="bookid"  jdbcType="NUMBER"
 
            javaType="java.lang.Integer"  mode="IN" />

</parameterMap>


here i am not getting that how to pass bookid value to update statement

i am getting error like this

the ibatis program 7com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in SqlMap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the updateAccount-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: ORA-01008: not all variables bound


if any one know solution for this problem plz send me  reply
-- 
View this message in context: 
http://www.nabble.com/how-can-we-send-formbean-bookid-value-to-update-statement-tp16930962p16930962.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to