DSP Pages and Oracle COUNT(*) Results ?

We want to use DSP pages to display statistics for transactions flowing through our system. We don’t seem to get any results back from the dsp page when we use an Oracle query with a COUNT(*).

WHERE DATE = ‘vardate’

When I execute the service that contains the flow execSQL from within wM Developer, the Results page displays a record list called “results” that contains one record “results[0]” with one entry named “TOTCNT” that has a value of “3”.

When I run this in a dsp page, I get back a result of “Total Trans = 0”

dsp code looks like this:
%loop results%
Total Trans = %value TOTCNT%

I’ve tried coding it every which way, but can’t get dsp page to display the actual COUNT(*) value

Any suggestions?

What version of IS are you running?

The execSQL service returns a com.wm.util.Table object instead of a true IData[] (Table doesn’t have to repeat the keys for each entry like IData[] does).

At least in 4.6 there is code to handle converting com.wm.util.Table into an IData[] when processing a DSP loop operation.

The fact that there is a zero displayed would mean to me that there was a value found for the TOTCNT column otherwise it would be empty, so I don’t understand why the value would be different from what Developer displays.

You may want to do an explicit conversion of Table to IData[] in the service that is called from the DSP.