-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Calling database functions from Hibernate...
PostPosted: Mon Jan 05, 2004 7:46 am 
Newbie

Joined: Sun Dec 07, 2003 8:26 am
Posts: 2
Location: Bangkok, Thailand.
Guys,

I'm using Hibernate 2.0, MS SQL Server 2000, and JSP technologies. I have a user-defined function, namely GET_PRIVILEGE, in the SQL Server but I don't know how to call this function from Hibernate.


Any help would be appreciated. :)

iahcapus


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 8:01 am 
Regular
Regular

Joined: Mon Nov 24, 2003 6:36 pm
Posts: 105
You can get a connection from a session, and do everything you would do with normal jdbc, so maybe this would work for your issue.

session.connection()


--James


Top
 Profile  
 
 Post subject: Please clarify ...
PostPosted: Mon Jan 05, 2004 8:14 am 
Newbie

Joined: Sun Dec 07, 2003 8:26 am
Posts: 2
Location: Bangkok, Thailand.
I am kind of new to this so please kindly clarify your answer.Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 1:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can call session.connection() where session is a Hibernate Session object. This gives you a normal JDBC Connection object where you can do anything you would do in normal JDBC code. (Execute plain SQL, etc.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.