Datatable.Compute using Filter for Boolean Field.

Posted on 2008-11-03
Last Modified: 2008-11-03

What's wrong with my code?

dtTable.Compute("SUM(PayAmount)", "Selected = TRUE")

Thank you.
Question by:emi_sastra
    LVL 4

    Accepted Solution

    Try the following:
    dtTable.Compute("SUM(PayAmount)", "Selected = 1")
    LVL 20

    Expert Comment


    What's the error you get?

    Anyway, there is nothing obviously wrong. except that I would try:
    dtTable.Compute("SUM(PayAmount)", "Selected = 1")

    but, without more information, it's just a guess.
    LVL 20

    Expert Comment

    Sorry BToson, just typing at the same time :)
    LVL 1

    Author Comment

    Hi BToson,

    Thank you very much for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now