VoiceGuide IVR Software Main Page
Jump to content

Multi Row Results...

Recommended Posts

I have seen several articles and responses as to how to deal with queries resulting in multi-row results. My question is how does one simply do a query and have a script read back the multiple results (eg. you put in a code which represents a category and then you want the VG app to read back the results):

In Category 1 there are the following items

1001 Shoes

1002 Socks

1003 Boots

 

It appears you need to basically write most of the code in Visual Basic and the ActiveX/COM interface. Am I simply missing something? Thanks.

Share this post


Link to post

A similar question on how to read out multiple rows of information from a database was posted only few days ago:

 

http://voiceguide.com/forums/index.php?showtopic=623

 

The sample script attached towards the end of that thread shows how to read out such information using VoiceGuide. The whole script takes about 10 modules and does not use any VB Scripting...

 

Most of applications can be done with VoiceGuide without the need to get into VBScripting and COM. VBScripting and COM is only really necessary for very complicated projects.

Share this post


Link to post

Yes I understand that the row subscript can be setup as in your example. My issue is that of the column subscript. Specifically, can the column be specified by a label reference rather than a position reference? In your script it would be:

$RV[GetExchangeInfo_<label ref>_$RV[RateIdx]]

rather than

$RV[GetExchangeInfo_1_$RV[RateIdx]]

 

Kevin

Share this post


Link to post

You mean can you use a Result Variable to specify a column? Sure.

 

You can next Result Variables in any way you want... the below would be ok:

 

$RV[GetExchangeInfo_$RV[ColumnIdx]_$RV[RateIdx]]

 

(there is a bug in v5.0 which stops nested RVs from working, but v4.9 works OK, and v5.1 Beta3 onwards will work.)

Share this post


Link to post

I guess I'm not making myself clear. I want to specify something like this:

 

$RV[GetExchangeInfo_$RV["ItemName"]_$RV[RateIdx]]

 

meaning that I don't want my code to care about the order of columns or additions. I just want to pull the column data by name (as in the example I want the data corresponding to the column representing the ItemName value). Is this possible???

Share this post


Link to post
can the column be specified by a label reference rather than a position reference?

No.

 

VoiceGuide does not do any analysis on the SQL sent to the database, so it is not aware of what column label corresponds to what entry index... it just knows that a certain number of entries per row are returned and it enumerates the results.

 

One way to get around this is to create RV's for each column entry requested - with RV name based on the column's name, then assign to then the index based on the position in the SQL statement and then use these RV's to retrieve the entry based on the column name... but this is a pretty roundabout way of getting things done... not too sure what is the problem that needs to solved here but it sounds pretty sophisticated and maybe it would be better to start looking at just doing all the DB retrieval in a VB Script module as well?

Share this post


Link to post

That was what I thought. I was hoping to avoid that but it looks like we'd need to do that to make VG work for our porposes. Thanks for all your help.

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
×