VoiceGuide IVR Software Main Page
Jump to content

Data retrieved from MySQL are all 0

Recommended Posts

No matter what the number is in mysql database, say number module only give me zero. really drive me nuts.

my operrating system is Winnt 4.0 with myodbc 3.51 driver and mysql 4.0.15 installed. I'm using dialigic 41/h. below is the VG scrrips.

 

Version=5.0

DefaultModuleDisplayHeight=

StartModule=select

RunAtHangup=

StartWithoutAnswer=0

CtmAsiName=

 

[select]

Type=Play

DispSize=69

Txt=Play a sound file, then await a response...

PlayFile1=C:\TEMP\voice\enter.wav

Replay=2,5

strTtsText=

on {1} goto [get product code number]

 

Position=40,48

 

[get product code number]

Type=Get Numbers

DispSize=69

Txt=Play a prompt asking the caller to enter a sequence of numbers, speak the sequence back to the caller and ask them to confirm it. Go down different paths depending on the numbers entered...

Replay=2,5

GetNbrLenEnforce=0

Confirm=OFF

on {success} goto [quantity query]

 

Position=229,49

 

[quantity query]

Type=Database Query

DispSize=69

Txt=Search the database for data. You can then use the returned results later in your script (see Result Variables), eg: in the Say Number module or as parameters to the program calles in a Run Program module.

DbDatabase=test

DbUser=

DbConnectString=ODBC;DRIVER={MySQL ODBC 3.51 DRIVER};server=localhost;database=test;user=myusname;password=mypass;port=3306;

DbSql=SELECT products_quantity FROM products WHERE products_id = $RV[get product code number]

on {success} goto [say quantity]

 

Position=459,50

 

[say quantity]

Type=Say Numbers

DispSize=69

Txt=Say the number, amount, date or the digits. See the list o options to see how the number supplied can be interpreted and spoken out...

PlayFile2=$RV[quantity query]

Replay=2,5

SayNbrType=Number

 

Position=463,149

 

 

below is log file:

 

select 1

get product code number 6

quantity query_RowCount 1

Hangup time 4/24/04

 

 

 

in mysql the products_id and products_quantity are INT type.

 

give me help please!

Share this post


Link to post

Looking at the script I'd say that you're using an incorrect Result Variable in the module [say quantity]

 

Please read the "Query Results" section of the "DB Query Module" entry in VoiceGuide Help file. Online copy of relevant page is here:

http://www.voiceguide.com/vghelp/html/modDbQuery.htm

 

Right now in [say quantity] module you are using "$RV[quantity query]" - you should be using $RV[ModuleTitle_ColumnIndex_RowIndex]

eg:

 

$RV[quantity query_1_1]

 

 

If you are still having problems after making the change could you please post a copy of VoiceGuide's Debug Printout which captures the problem, this will allow us to see what is going wrong.

(When running the script click on VoiceGuide's View menu and select 'Event Trace Log' option - any log information will then appear in this window. You must open the trace window before making the call.)

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
×