Filling a dataset using one stored procedure

G

Guest

Dear all,

i would like to ask if it possible to fill a dataset using one stored
procedure,

for example:

we have two tables ( emp ) and ( Dept )

can i use the following stored procedure to fill the dataset

< SQL CODE >
Create procedure sp_emp_and_Dept
AS
begin

select * from emp

select * from dept
end



Thanks,
Rami
 
M

Mohamed Harris via DotNetMonster.com

Hi,

You better to use the following query with in your SP

select e.field1,e.field2,d.field1,d.field2,d.field3 from emp e,dept d <where>



Harris
 
G

Guest

Thanks Mohammed but the method that i was looking for is mapping tables
comming from the multi select statements

the mapping will be as following:

<Adapter>.TableMapping.Add ( "Table", "emp" )
<Adapter>.TableMapping.Add ( "Table1", "Dept" )


Thanks
Mohammed,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top