Compute By SQL Statement

G

Guest

Hi all,

Just wanted to share my newest discovery in ADO.NET. I just realized that
when I use a Compute By statement in my sql stored proc, I get 3 tables added
to a dataset. I expected to get 2 .. since when u run such a statement in
Query Analyzer u get two tables (recordsets), but in ADO.NET the dataset gets
populated with the correct ones (the table generated by the general query +
the table generated by the computer by stmt) + an additional table of the
general query.

This is a bug in ADO.NET I suppose,

Thanks,

Amadelle
 
W

William \(Bill\) Vaughn

Ah no. Each DataTable represents the rows returned from rowset-bearing
resultsets. A compute-by might return several resultsets containing the
subtotals, subsubtotals and grand totals.


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
G

Guest

No I agree on multiple resultsets that is not the issue, the part that is a
bug and you can test this, is that it returns the initial table (result set),
twice in the dataset!
The initial table being your select query (that is added in the ds
twice)...not your compute by part ...

Amadelle
 
W

William \(Bill\) Vaughn

Okay, I'll put this on my list of issues to check out.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 

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