VoiceGuide IVR Software Main Page
Jump to content

Speak Many Numbers

Recommended Posts

I have a VBS that recovers many values in a recorset

 

Example:

 

LineID = $RV_LINEID

CustId = "$RV[GetCustID]"

 

'This query returns many values of AccNumbers

StrSQL = "SELECT AccNumbers from CUSTOMERS where CustId = " & CustId

Set Rs = Conn.Execute(StrSQL)

 

Do While Not Rs.EoF

AccNumber = Rs.Fields("AccNumbers").Value

vg.RvSet LineID,"AccNumber",AccNumber

vg.Script_Goto LineID,"","SpeakAccNumber","" ' This is the module that reproduces the numbers

Rs.MoveNext

Loop

 

As I have tried it does not work thus, the program ends in abnormal form in the line of call to the Speak number module.

 

Wath I can do to reproduce all the values (numbers) stored in a recordset, using a Speak number module?

 

Thanks

Share this post


Link to post

You would need to create a Result Variable for each account number.

 

The "Database Query" module would do all of that for you: from http://www.voiceguide.com/vghelp/source/html/moddbquery.htm :

 

eg: module LookupTelFax uses a query: SELECT Tel, Fax FROM Customer WHERE CustId='$RV[Get CustId]' . We can use $RV[LookupTelFax_1_1] to access the contents of the Tel column and use LookupTelFax_2_1 to access he contents of the Fax column for customer 1. We can use $RV[LookupTelFax_1_2] to access the contents of the Tel column for customer 2, etc.

 

And then you would setup a loop using Evaluate Expression modules and have a Say Number module as part of that loop. The loop would increment a counter and you then use the counter as part of the RV name to access the 'next' RV in list of RVs made.

There are some instructions on how to setup a loop here: http://www.voiceguide.com/vghelp/source/html/modevalexpr.htm

 

The attached script also demonstrates the approach.

 

If you want to do the Database retrieval from a VBScript then you would just need to have the VBScript create RVs named in a similar format to how the Database Query module names them, and you can then use the counters as part of the naming scheme to cycle though the responses.

 

Hope that is clear, let us know if you have any further questions.

Loop_Play_Data_Retrieved_From_DB.vgs

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
×