SQL Count Function - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

SQL Count Function

Last post 02-13-2008 10:03 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-12-2008 07:14 AM

    SQL Count Function

    I am running the below SQL Count function in Script.  How do I access the results?  I need to fix the statement in bold.


    "select count(*)";

    "from ";

    "[LaborSummary] as [LaborSummary] ";

    "where ([LaborSummary].PROGRAM = '" + programPrefix + "') and ([LaborSummary].CA1 = '" + ca1Prefix + "') ";

    var countRecords = count(*);

    Filed under: ,
  • 02-13-2008 10:03 AM In reply to

    Hi Steve,

    You need to look at the XML that is stored in the 2DS.  If you type this SQL directly into the wizard that you use to create the connection to your database, then you will have a view of the XML returned, but if you cannot, then you need to get at it programmatically.  For web services this is accessed via the OutputLocation parameter, but I'm not sure how to do it with DB connections.


    If all else fails, add this as a view to your database, and then just query it for all rows.

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.