VoiceGuide IVR Software Main Page
Jump to content

Query Module Rowcount Issue

Recommended Posts

Hi,

 

How do I initialize the _rowcount property of a Query Module? If I get 0 rows back from a query, there is no result in the _rowcount variable. I need the rowcount variable to return a 0 with 0 rows in order to do a comparison, and branch or not branch to a different part of the script. Is this behaviour by design?

 

Also - If you use the same query module to requery a changed dataset, and the dataset goes from 1 row to 0 rows, the row from the first query is still persisted in the query module. Any way to clear this?

 

Mike.

Share this post


Link to post

Attached vgmulti.exe now sets the "_rowcount" Result Variable to 0 if no data has been returned. You can use the .exe to update existing v5.2.1 installations of VoiceGuide.

 

If using an older version of VG then as a workaround it is possible to explicitly set the "_rowcount" RV using an Evaluate Expression module to 0 before running the DB Query module.

 

If you use the same query module to requery a changed dataset, and the dataset goes from 1 row to 0 rows,

The _rowcount will now be 0 - but the RVs from previous query are still available.

 

The general rule with RVs is that they are never destroyed once they are created - but they may have their values changed.

 

RVs for a line are only destroyed when a new call arrived on the line - this allows retrieval of any RV values via the COM interface after the call has completed (but before new call arrives).

VgMulti_5.2.1027.zip

Share this post


Link to post

Hi,

 

Regarding the result variable persistence - If I reuse a Database Query Module and the second query returns fewer rows than the first query, will the result variable return just the rows from the second query? Stated more simply, is the result variable cleared before a query is (re)run in a Database Query Module?

 

Mike.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×