-->
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: What are the Stored Procedure Limitation?
PostPosted: Wed Sep 26, 2007 9:51 am 
Newbie

Joined: Wed Sep 05, 2007 1:25 am
Posts: 10
New to NHibernate and evaluting at the same time.

Working of Legacy Database and wondering about suitability.
We would like to give many of our stored procedure the "chop",but also there will be cases when we want to use them.

Can somebody give a quick overview of what they cannot do?

Can they handle stored Procedures with Temporary Table and Dinamic sql inside them?

etc.....

Thanks in advance


Top
 Profile  
 
 Post subject: Re: What are the Stored Procedure Limitation?
PostPosted: Wed Sep 26, 2007 11:30 pm 
Regular
Regular

Joined: Wed Oct 25, 2006 10:51 pm
Posts: 71
devnet wrote:
Can they handle stored Procedures with Temporary Table and Dinamic sql inside them?

It doesn't matter what the Stored Procedure does, NHibernate will just execute it for you.

You're not really using NHibernate when you're running stored procedures. You just use the connection that NHibernate has got. All I do is this (where 'Session' is a property to get my ISession object)

IDbConnection connection = Session.Connection;
IDbCommand command = connection.CreateCommand();
Session.Transaction.Enlist(command);
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "spDeleteSomething";
command.ExecuteNonQuery();


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 27, 2007 5:54 am 
Newbie

Joined: Wed Sep 05, 2007 1:25 am
Posts: 10
thank you very much that is what I wanted to know


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 27, 2007 7:09 pm 
Beginner
Beginner

Joined: Wed Aug 01, 2007 4:28 pm
Posts: 23
Is there a database neutral way to get a dataset back like this?


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.