• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate call to Stored Procedure SQL server 2005

 
Justin Howard
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am not able to find examples for SQL Server 2005 Stored procedure usage.
Can anyone point me to a link or an article ?

Thanks

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The product documentation contains a lot of examples.
 
Justin Howard
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
I was totally unclear with my question earlier.

I was reading the hibernate documentation and it said the way a stored procedure is called in Hibernate is
different for different databases. But I could not find any examples with sql server. Most of them I found were
oracle, MySql etc..

Can you please help me find some examples.

Thanks
 
Piotrek Tempes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if I understood your question correctly, but I am calling stored procedure with this:

@SQLInsert(callable= true, sql="{CALL RecordEventErrorCounters(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}")

and if You got this by your class you have to call persist method on entity manager
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!