Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String to Date conversion error: EJB Informix

syed mraza
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks
i am using Entity (2.0) EJB to update/insert in Informix database. the date columns have "date" datatype in table and the EJB ( generated by JDeveloper 9.3) create getter/setter for such columns having java.lang.String as parameters.
Now whn i use ejb.setDate( stringDate); i get string to date conversion error. even though the string is in MM/dd/yyyy format. and whn i used the same string to insert manualy ( from iSQL) into database. it works fine.
i found another soluction if i change all the getter/setter to java.sql.Date it works fine. but its quite laborious ( have a lots of entity EJB to change and respective session EJBs).
any pointers. any suggestions?
would realy appriciate ure help.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic