Hi
You are refering to calling Execute reader 3 times in a row? or are
you trying to get back 3 selects in the one call?
The first is achievable by closing the reader after you have stashed
all the data, clear the parameters collection and executereader again
etc.
The only way to do the second that I can think of is to use temp
tables in the proc and return the union of their 3 separate select
into statements
hth
Bob
Or
SqlCommand cmd = new SqlCommand("MyProc", connection);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
ds.Tables[0] - result of first select
ds.Tables[1] - result of second select
ds.Tables[3] - result of third select
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.