• Post Reply Bookmark Topic Watch Topic
  • New Topic

prepared statement or parameter query in EJB 3  RSS feed

 
Vijay jai Singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

i want to use prepared statement with ejb3 to insert data in oracle. is it possible to use.

i try to find some example on net but i could not find any good example.

Please help me to use it. or is there any other way to use parameter query (as we use ? in prepared statement) in ejb3

Thanks and regards
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay,
You have two choices:

1) Use JPA with binding variables. See the input parameters section for an example.
2) Use an actual JDBC prepared statement in a session bean.

It sounds like #1 meets the spirit of what you are trying to do. Since you didn't specify JPA/entities, you could in theory have been referring to any type of EJB.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!