I was wondering if i can use a single query in sql server 2005 to return as a dataset in c#, asp.net 2005 into different tables.
DataSet ds = new DataSet();
ds = new BusinessLogic.BizLogic().getData(int repID);
for(ds != null)
{
txtDate.Text = ds.Tables[2].Rows[0]["Date"].ToString();
}
Want to figure out, how to write the store procedure to have multiple tables.A simple example would be appreciated. Thank you!
You absolutely can, although you may want to consider the overall goal and implications of considering this design.
In your stored procedure you just simply have multiple selects ala..
select xxx, yyy from table1
select zzz, nnn from table2
Along those lines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With