Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in inserting row in the database

 
Sudhakar Rao
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am using an entity bean for inserting and updataing the rows in the database.When I am trying to update the database its working fine. But when I am trying to insert its throwing null pointer exception.
For creating the rows, I have insert statement in ejbCreate()method.
For updating the rows, I have update statement in ejbStore() method.

Can any body explain, how to resolve it.
Thanks
Sudhakar
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it a CMP bean? If so, you should not have SQL statements in your bean code.
 
Santosh Pasupuleti
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudhakar,
Could you please mention if you are using CMP or BMP beans?

Please display the code that you have written in the ejbCreate() method.

Regards
Santosh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!