PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Does DataSetHelper support grouping by MULTIPLE columns?

Reply

Does DataSetHelper support grouping by MULTIPLE columns?

 
Thread Tools Rate Thread
Old 30-06-2003, 06:50 AM   #1
Brian
Guest
 
Posts: n/a
Default Does DataSetHelper support grouping by MULTIPLE columns?


When I have attempted to use the InsertGroupByInto() method to group by
multiple columns, the DataSetHelper class throws a NullReferenceException
unless I select the Rollup option (which I don't want). I'm trying to group
by 5 columns with only a single aggregate column (count()). When I select
only ONE column to group by, it works fine--when I add any number of
additional columns, it blows up.

Has anyone gotten this to work before?

Thanks,
B


  Reply With Quote
Old 30-06-2003, 07:48 PM   #2
Scot Rose [MSFT]
Guest
 
Posts: n/a
Default RE: Does DataSetHelper support grouping by MULTIPLE columns?

What do you mean by Dataset helper? The Server explorer???

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : scotr@online.microsoft.com <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
>From: "Brian" <none>
>Subject: Does DataSetHelper support grouping by MULTIPLE columns?
>Date: Sun, 29 Jun 2003 23:50:59 -0700
>Lines: 13
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#xIm3PtPDHA.3880@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.adonet
>NNTP-Posting-Host: ca-santaanahub-cuda2-c2a-a-112.anhmca.adelphia.net 68.67.134.112
>Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
>Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.adonet:9510
>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>
>When I have attempted to use the InsertGroupByInto() method to group by
>multiple columns, the DataSetHelper class throws a NullReferenceException
>unless I select the Rollup option (which I don't want). I'm trying to group
>by 5 columns with only a single aggregate column (count()). When I select
>only ONE column to group by, it works fine--when I add any number of
>additional columns, it blows up.
>
>Has anyone gotten this to work before?
>
>Thanks,
>B
>
>
>



  Reply With Quote
Old 30-06-2003, 08:24 PM   #3
Brian
Guest
 
Posts: n/a
Default Re: Does DataSetHelper support grouping by MULTIPLE columns?

No, the DataSetHelper class referenced in this article:
http://support.microsoft.com/defaul...b;EN-US;Q325685

I have attempted passing in multiple columns for the GroupBy parameter of
InsertGroupByInto(), but an exception is thrown. This is the call I'm
making:
dsHelper.SelectGroupByInto("Groups", MySourceTable, "Col1, Col2, Col3,
Col4, Col5, Col6, Count(Col7) Quantity", "", "Col1, Col2, Col3, Col4, Col5,
Col6", False)
I am only specifying a single aggregate column and do not want rollups (the
final parameter).

Thanks,
Brian

"Scot Rose [MSFT]" <scotr@online.microsoft.com> wrote in message
news:SRbGdC0PDHA.1724@cpmsftngxa09.phx.gbl...
> What do you mean by Dataset helper? The Server explorer???
>
> Want to know more? Check out the MSDN Library at http://msdn.microsoft.com

or the Microsoft Knowledge Base at http://support.microsoft.com
>
> Scot Rose, MCSD
> Microsoft Visual Basic Developer Support
> Email : scotr@online.microsoft.com <Remove word online. from address>
>
> This posting is provided "AS IS", with no warranties, and confers no

rights.
>
>
>
>
> --------------------
> >From: "Brian" <none>
> >Subject: Does DataSetHelper support grouping by MULTIPLE columns?
> >Date: Sun, 29 Jun 2003 23:50:59 -0700
> >Lines: 13
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >Message-ID: <#xIm3PtPDHA.3880@tk2msftngp13.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.framework.adonet
> >NNTP-Posting-Host: ca-santaanahub-cuda2-c2a-a-112.anhmca.adelphia.net

68.67.134.112
> >Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
> >Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.adonet:9510
> >X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
> >
> >When I have attempted to use the InsertGroupByInto() method to group by
> >multiple columns, the DataSetHelper class throws a NullReferenceException
> >unless I select the Rollup option (which I don't want). I'm trying to

group
> >by 5 columns with only a single aggregate column (count()). When I select
> >only ONE column to group by, it works fine--when I add any number of
> >additional columns, it blows up.
> >
> >Has anyone gotten this to work before?
> >
> >Thanks,
> >B
> >
> >
> >

>
>



  Reply With Quote
Old 01-07-2003, 06:30 PM   #4
Scot Rose [MSFT]
Guest
 
Posts: n/a
Default Re: Does DataSetHelper support grouping by MULTIPLE columns?

Oh Ok, Its not a part of Visual studio, it is a code example. When the article was written the author probably didn't add that functionality. In this particular case, since you have all of
the source code available, you should be able to add the functionality you seek. Do you know what line of the code it is failing in? Does it give any errors when you do not include
the Aggregate column (I saw no support in the code for that If you need it you would need to modify the helper class)

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : scotr@online.microsoft.com <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
>From: "Brian" <none>
>References: <#xIm3PtPDHA.3880@tk2msftngp13.phx.gbl> <SRbGdC0PDHA.1724@cpmsftngxa09.phx.gbl>
>Subject: Re: Does DataSetHelper support grouping by MULTIPLE columns?
>Date: Mon, 30 Jun 2003 13:24:01 -0700
>Lines: 68
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <er74SW0PDHA.2228@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.adonet
>NNTP-Posting-Host: ca-santaanahub-cuda2-c2a-a-112.anhmca.adelphia.net 68.67.134.112
>Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
>Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.adonet:9570
>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>
>No, the DataSetHelper class referenced in this article:
>http://support.microsoft.com/defaul...b;EN-US;Q325685
>
>I have attempted passing in multiple columns for the GroupBy parameter of
>InsertGroupByInto(), but an exception is thrown. This is the call I'm
>making:
> dsHelper.SelectGroupByInto("Groups", MySourceTable, "Col1, Col2, Col3,
>Col4, Col5, Col6, Count(Col7) Quantity", "", "Col1, Col2, Col3, Col4, Col5,
>Col6", False)
>I am only specifying a single aggregate column and do not want rollups (the
>final parameter).
>
>Thanks,
>Brian
>
>"Scot Rose [MSFT]" <scotr@online.microsoft.com> wrote in message
>news:SRbGdC0PDHA.1724@cpmsftngxa09.phx.gbl...
>> What do you mean by Dataset helper? The Server explorer???
>>
>> Want to know more? Check out the MSDN Library at http://msdn.microsoft.com

>or the Microsoft Knowledge Base at http://support.microsoft.com
>>
>> Scot Rose, MCSD
>> Microsoft Visual Basic Developer Support
>> Email : scotr@online.microsoft.com <Remove word online. from address>
>>
>> This posting is provided "AS IS", with no warranties, and confers no

>rights.
>>
>>
>>
>>
>> --------------------
>> >From: "Brian" <none>
>> >Subject: Does DataSetHelper support grouping by MULTIPLE columns?
>> >Date: Sun, 29 Jun 2003 23:50:59 -0700
>> >Lines: 13
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>> >Message-ID: <#xIm3PtPDHA.3880@tk2msftngp13.phx.gbl>
>> >Newsgroups: microsoft.public.dotnet.framework.adonet
>> >NNTP-Posting-Host: ca-santaanahub-cuda2-c2a-a-112.anhmca.adelphia.net

>68.67.134.112
>> >Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
>> >Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.framework.adonet:9510
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>> >
>> >When I have attempted to use the InsertGroupByInto() method to group by
>> >multiple columns, the DataSetHelper class throws a NullReferenceException
>> >unless I select the Rollup option (which I don't want). I'm trying to

>group
>> >by 5 columns with only a single aggregate column (count()). When I select
>> >only ONE column to group by, it works fine--when I add any number of
>> >additional columns, it blows up.
>> >
>> >Has anyone gotten this to work before?
>> >
>> >Thanks,
>> >B
>> >
>> >
>> >

>>
>>

>
>
>



  Reply With Quote
Old 19-07-2003, 12:58 AM   #5
Greg Gates
Guest
 
Posts: n/a
Default Re: Does DataSetHelper support grouping by MULTIPLE columns?

"Brian" <none> wrote in message news:<#xIm3PtPDHA.3880@tk2msftngp13.phx.gbl>...
> When I have attempted to use the InsertGroupByInto() method to group by
> multiple columns, the DataSetHelper class throws a NullReferenceException
> unless I select the Rollup option (which I don't want). I'm trying to group
> by 5 columns with only a single aggregate column (count()). When I select
> only ONE column to group by, it works fine--when I add any number of
> additional columns, it blows up.
>
> Has anyone gotten this to work before?
>
> Thanks,
> B


I experienced the same problem.
Try the C# version, seems to work better.

http://support.microsoft.com/defaul...kb;EN-US;326145

I found what appears to be a small bug in that all columns are
prepended with 'of', even if they are not aggregates. Pretty easy to
fix this.


thanks, Greg
  Reply With Quote
Old 03-08-2003, 01:11 PM   #6
Nir
Guest
 
Posts: n/a
Default Re: Does DataSetHelper support grouping by MULTIPLE columns?

Hi all

Does anybody have the fix in vb.net ?

Thank's Nir
  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off