Multiple Results in Stored procedure

Posts   
 
    
amrosalah
User
Posts: 12
Joined: 04-Apr-2008
# Posted on: 04-Apr-2008 19:08:23   

I have question about a situation like this i have a stored procedure looks like this

create proc myProc as

SELECT * FROM cusomters SELEC * FROM orders

How can i cast the resulting DataTable into the entity type Customer and Order ? Can someone post sample code for me ?

vairam2008
User
Posts: 86
Joined: 11-Mar-2008
# Posted on: 04-Apr-2008 20:05:03   

the procedure construct itself looks wrong, did you mean that it will return one result or the other conditionally?

amrosalah
User
Posts: 12
Joined: 04-Apr-2008
# Posted on: 04-Apr-2008 20:10:31   

vairam2008 wrote:

the procedure construct itself looks wrong, did you mean that it will return one result or the other conditionally?

This is correct
SQL server supports returning unlimted number of results in one statment . This is useful as a performance gain . You can get a customer and his orders in one trip to the server .

Oracle supports this also using packages . MySQL supports it also via procedures .

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-Apr-2008 06:49:48   

That's indeed possible. Please read LLBLGenPro Help - Using the generated code - (Adapter | SS) - Fetching DataReaders and projections - Resulset projections - Projecting Stored Procedure resultset onto entity collection.

David Elizondo | LLBLGen Support Team