VoiceGuide IVR Software Main Page
Jump to content

Vbs Returns "verify_passed", But Fail Path Taken.

Recommended Posts

I have a simple VBS module that is running right of the start of my script. It does two simple queries to make sure the databases are online, and returns a "verify_passed" if they are.

 

When I test it, it takes the fail path. I've taken the VBS out of VG, to verify that it's working properly and it does.

 

Back in VG, if I turn on a msgbox to see the variable that's returning the verify code, it says "verify_passed", however the module that I've specified as the fail path starts to run.

 

Here is the VB I'm running (with security sensitive info removed). This is a version of the VB for testing outside of VG, hence the vg lines have been commented out.

 

VBS START

_____________________________________________

 

dim objDBConnection, objDBRecordset, vg, query, sResult

 

'set vg = CreateObject("VoiceGuide.CommandLink")

 

Const adOpenStatic = 3

Const adLockOptimistic = 3

Const adUseClient = 3

 

Set objDBConnection = CreateObject("ADODB.Connection")

Set objDBRecordset = CreateObject("ADODB.Recordset")

 

'connect to DB

objDBConnection.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=SERVER;DATABASE=DB;USER=ME;PASSWORD=PWORD;"

objDBRecordset.CursorLocation = adUseClient

 

query = "SELECT users.user_id FROM users WHERE users.active='Y' AND users.title_type=6;"

 

objDBRecordset.Open query, objDBConnection, adOpenStatic, adLockOptimistic

 

if objDBRecordset.RecordCount > 0 then

sResult="verify_passed"

else

sResult="verify_failed"

end if

objDBRecordset.Close

 

query = "SELECT merch_timesheets.trx_id FROM merch_timesheets;"

 

objDBRecordset.Open query, objDBConnection, adOpenStatic, adLockOptimistic

 

if objDBRecordset.RecordCount > 0 then

if sResult="verify_passed" then

sResult="verify_passed"

else

sResult="verify_failed"

end if

else

sResult="verify_failed"

end if

msgbox sResult

'vg.Run_ResultReturn $RV_LINEID, sResult

'set vg = Nothing

'set objDBConnection = Nothing

'set objDBRecordset = Nothing

 

' END CODE_____________________________________________

Share this post


Link to post

Could you please post a copy of VoiceGuide's Trace Logs which captures the problem, this will allow us to see what happened.

 

Enable logging by setting the log levels to 10 in VG.INI as per below:

[Log]

 

VoiceGuide=10

Then restart VG and make a test call which demonstrates the problem.

 

Trace files will be created in VG's \log\ subdirectory.

 

Please post the traces and the VoiceGuide script used.

 

When posting traces/scripts please .ZIP them up and post them as attachments.

Share this post


Link to post

Trace shows that after the call is answered a "Run VBscript" type module titled "DBpreCheck" is first ran:

 

151412.86 2 state [DBpreCheck] Running VB Script...

 

The "verify_passed" and "verify_failed" returnes are only meant to be used in a verification VBScript which is ran in a Get Number module.

 

In a normal "Run VBScript" module you should use "success" or "fail" return codes.

 

Please see: http://www.voiceguide.com/vghelp/source/html/modvbs.htm and http://www.voiceguide.com/vghelp/source/ht...odgetnumber.htm

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
×