-->
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.  [ 2 posts ] 
Author Message
 Post subject: Stored procedure multiple results set
PostPosted: Tue Apr 20, 2010 7:18 am 
Newbie

Joined: Mon Sep 08, 2008 3:53 am
Posts: 4
I've created a stores procedure which retures two resultset

Code:
select top 100 * from shipment
select top 1000 * from shipment


executing this will return 1100 rows from shipment.

But when running this through nHibnernate

Code:
IList<Shipment> shipments = session.CreateSQLQuery("exec test").AddEntity(typeof(Shipment)).List<Shipment>();


this only returns the first 100 rows and not the expected 1100 rows.

is it possible to make nHibernate wait for the last resultset?


Top
 Profile  
 
 Post subject: Re: Stored procedure multiple results set
PostPosted: Tue Apr 20, 2010 8:35 am 
Newbie

Joined: Mon Sep 08, 2008 3:53 am
Posts: 4
Well i can't belive i missed the MS SQL in
Quote:
For Sybase or MS SQL server the following rules apply:

The procedure must return a result set. Note that since these servers can return multiple result sets and update counts, Hibernate will iterate the results and take the first result that is a result set as its return value. Everything else will be discarded.

I guess i have to solve this in an other way that using stored procedures.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.