PC Review


Reply
Thread Tools Rate Thread

Compute By SQL Statement

 
 
=?Utf-8?B?QW1hZGVsbGU=?=
Guest
Posts: n/a
 
      13th Jul 2005
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
 
Reply With Quote
 
 
 
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      13th Jul 2005
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.
__________________________________

"Amadelle" <(E-Mail Removed)> wrote in message
news:C615DF63-27DC-4ABE-AFFB-(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?QW1hZGVsbGU=?=
Guest
Posts: n/a
 
      13th Jul 2005
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

"William (Bill) Vaughn" wrote:

> 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.
> __________________________________
>
> "Amadelle" <(E-Mail Removed)> wrote in message
> news:C615DF63-27DC-4ABE-AFFB-(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      13th Jul 2005
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.
__________________________________

"Amadelle" <(E-Mail Removed)> wrote in message
news:A3486E88-2F09-4FE8-8CB9-(E-Mail Removed)...
> 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
>
> "William (Bill) Vaughn" wrote:
>
>> 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.
>> __________________________________
>>
>> "Amadelle" <(E-Mail Removed)> wrote in message
>> news:C615DF63-27DC-4ABE-AFFB-(E-Mail Removed)...
>> > 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

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compute age ad Microsoft C# .NET 5 29th Mar 2008 03:38 PM
using compute by vikram_singh@hotmail.com Microsoft Access Queries 1 14th Dec 2007 02:21 PM
My Compute Frank Windows XP Basics 3 18th Oct 2007 09:05 AM
Conditional Statement to Compute Average =?Utf-8?B?Z291ZG1pYw==?= Microsoft Excel Worksheet Functions 1 25th Aug 2006 03:14 PM
Compute Tax? FeDude Microsoft Excel Worksheet Functions 23 20th Oct 2003 10:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:37 PM.