Solved

For keijerjh - Hidden property issue

Posted on 2004-09-08
3
141 Views
Last Modified: 2010-04-23
My question was how do I get to the compute in the datagrid to do a sum of a table.  
0
Comment
Question by:oshe127
3 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 12010261
0
 
LVL 1

Accepted Solution

by:
keijerjh earned 250 total points
ID: 12013722
Hi,

Nice to hear that this was the solution.



Strange I see the problem. But it seems to be an hidden property when you access the table using the dataset.


The following code works.
------------------------------------------------------------------------
        Dim oDataSet As Data.DataSet
        Dim oDataTable As Data.DataTable
        Dim oDataRow As Data.DataRow

        oDataTable = New Data.DataTable
        With oDataTable
            .TableName = "ORDER_LINE"
            .Columns.Add("CUSTOMER_ID")
            .Columns.Add("ORDERED_QTY", GetType(Integer))
        End With
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "El Cheapo"
        oDataRow("ORDERED_QTY") = 14
        oDataTable.Rows.Add(oDataRow)
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "El Cheapo"
        oDataRow("ORDERED_QTY") = 20
        oDataTable.Rows.Add(oDataRow)
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "Wallmart"
        oDataRow("ORDERED_QTY") = 8
        oDataTable.Rows.Add(oDataRow)
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "Wallmart"
        oDataRow("ORDERED_QTY") = 9
        oDataTable.Rows.Add(oDataRow)

        oDataSet = New Data.DataSet
        oDataSet.Tables.Add(oDataTable)
        MsgBox(oDataSet.Tables("ORDER_LINE").Compute("SUM(ORDERED_QTY)", "CUSTOMER_ID='Wallmart'"))
 
 
0
 

Author Comment

by:oshe127
ID: 12015809
Thanks!
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question