VoiceGuide IVR Software Main Page
Jump to content

Problem With Vbscript X64

Recommended Posts

Sirs,

I'm working on a vbscript accessing a MySQL DB, making some tricks and delivering back 3 variables. The vbscript is written directly in the run vbscript module of voiceguide script (thus it is not an external script).
In the script I put a control (voice messages) to check results: if fails says one thing it success says another.
It always fails (and it does not execute the MYSQL insert as well).
The DSN is correctly configured and was created using the 32bit ODBCAD32.exe
I checked and the script correctly generates a VBS in the temp diretory.
The problem is that when I try to run this generated VBS (in order to debug it) using the following command: windows/syswow64/wscript //d "c:\program files (x86)\temp\vbs_3_1.vbs" ... the VBS gives no errors, seems to run perfectly and executes the mysql Insert without problems (this also proves that the DSN is correct and running in 32 bit mode).
I need to inform that all this is running in a Win Server 2008 R2 (x64), I know voiceguide is a 32bit application, may this be a problem ? When I made the debug of the script I used the 32 bit wscript.exe and gave no error. Is there anything I have to configure in order for voiceguide to use 32bits scripting in a X64 environment ?
Otherwise, which may be the problem ?? Below the full script (Ctrl-C and CTRL-V from voiceguide script desginer).

Thanks for your help.

Lorenzo

 

 

 

set vg = CreateObject("vgServices.CommandLink")
set cn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
cn.Open "DSN=DF_Remote_32"

randomize
dum = ""
FOR i = 1 TO 5
dum = dum & chr(Int(Rnd * 10) + 48)
NEXT

nowBra = now()
data = Year(nowBra) & "-" & Month(nowBra) & "-" & Day(nowBra) & " " & Hour(nowBra) & ":" & Minute(nowBra) & ":" & Second(nowBra)

sSQL = "INSERT INTO denuncias (data,source,senha,seguimento) VALUES('" & data & "',2,'" & dum & "',0);"
cn.Execute sSQL

set rs.ActiveConnection = cn
sSQL = "Select last_insert_id();"
rs.Open sSQL, cn, 3

IF rs.eof THEN
lastid = clng(0)
ELSE
lastid = clng(rs.Fields(0)) 'number of records
END IF
IF lastid < 100 THEN
codstr = "00" & cstr(lastid)
ELSE
codstr = cstr(lastid)
END IF

vg.Script_Return $RV_LINEID, "[senhaRem]{" & dum & "}[RecordCode]{" & lastid & "}[VoiceCode]{" & codstr & "}"

rs.Close
cn.Close
set rs = Nothing
set cn = Nothing
set vg = Nothing
WScript.Quit

 

Share this post


Link to post

Most likely the problem here is that only 64 bit ODBC drivers are installed on this system.

 

VoiceGuide is a 32 bit application - so it needs to use 32 bit ODBC drivers.

 

Please download and install MySQL's 32bit ODBC drivers on the VoiceGuide system (see: http://dev.mysql.com/downloads/connector/odbc/ )

 

 

To set up a 32 bit DSN then please note that the 32 bit ODBC manager is a different one to the 64 bit ODBC manager.

 

Also please read this:

 

http://support.microsoft.com/kb/942976

 

 

As VoiceGuide is a 32 bit application, to test script please try using the 32 bit wscript.exe, instead of the 64 bit one.

Share this post


Link to post

This unfortunately seems not to be the case.
This server is a fresh install just to run voiceguide. Knowing that voiceguide is a 32 bits app I installed, from the beginning, both 64 and 32 bits ODBC drivers (last version just downloaded from Mysql community Install).
Furthermore, the ODBC DSN used in the vbscript is a 32Bit one, made running ODBCAD32.exe from c:/windows/syswow64/ directory (which only could be possible to do with the 32bit ODBC driver installed, as far as I know).

As I explained (please read my first message) my testing of the scrips has also been done using 32 bit wscript, more precisely using the following command:

c:/windows/syswow64/wscript //d "c:\program files (x86)\temp\vbs_3_1.vbs" ... and using wscript.exe, 32 bit in syswow64 directory, the program runs with no errors.

I'm attaching the VGengine log for your due information. Thanks for your help.

Share this post


Link to post

Please remove the “WScript.Quit” call from your VBScript.

 

VoiceGuide does not use WScript/Cscript to execute the VBScript.

 

Any WScript call will cause an error.

 

VoiceGuide now uses an internal VBScript interpreter to run the VBScripts.

 

There is also another bug in VBScript interpreter that we need to resolve (will be today)

Share this post


Link to post

Please update your system to this version of VoiceGuide v7:

 

[old link removed]

 

And please make the following changes to your VBScript:

 

1. Remove WScript.Quit entry and any other calls to WScript object.

 

2. vg.Script_Return should be changed to vg.Run_ResultReturn

 

(please see: http://www.voiceguide.com/vghelp/source/html/com_run_resultreturn.htm )

 

 

 

If you encounter any issues please post the vgEngine trace file as before. Please .ZIP up any traces before posting.

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
×