hi , turn on Log4j and look at the sql statement, prepare, parameter and query result .
2009/7/7 Cax <cahyadiherma...@gmail.com> > > hello, I got a problem in iBatis, i hope somebody could help me... > i hit problem when i pass in a parameter which the data type is string, and > the field length in database is 19 char. But,it throws exception because > the > returned object is null. and then i try to change the WHERE clause > condition,to based on other field which the data type is number,and it > works... > i want to know what is the problem,is the string value too long or what? > > below is my code example : > > <select id="selectAccountById" parameterClass="Account" > resultClass="Account"> > select > PX_IR025_PAN as pan, > F9_IR025_CRN as CRN, > FX_IR025_EMB_NAME as name, > FX_IR025_CRD_PGM as crdPgm, > FX_IR025_UPD_UID as updId > from IR025 > where PX_IR025_PAN = #pan# > </select> > > > in java: > > Account acc = new Account(); > > acc.setpan("1234567890123456"); > > acc = (Account) sqlMapper.queryForObject("selectAccountById", acc); > //(Note : return null) > System.out.println(" " + acc.getname()); > > > Thanks before for your help....:-) > > > > -- > View this message in context: > http://www.nabble.com/String-parameter-problem-tp24370405p24370405.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-java-h...@ibatis.apache.org > >