Filling a dataset using one stored procedure

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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,
 
Back
Top