tsimek Report post Posted 10/04/2006 04:55 PM I connect to a MySQL database through an ADO object. Occassionally this object fails to connect. There is no problem with the ODBC connection or network or even the code. So I looked into the flow of the Script. I'd like to know how the VG.Script_Goto method works. Does this method allow the remaining code of the script to execute? Does it behave like a "GOTO" and jump into the module specified? I assume that not closing out the objects may have something to do with the problems I'm encountering... Here's the code: ******************************************************************************** * sConnString = "proservice" Set sconnection = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") set VG = CreateObject("VoiceGuide.CommandLink") sconnection.Open sConnString SQL = "SELECT ShipToZipCode FROM sc_all WHERE scID = $RV[sCID]" rs.open SQL, sconnection zipcode = rs("ShipToZipCode") rs.close SQL = "SELECT GMTOffset FROM zipcodes WHERE zipCode = '" & zipcode & "'" rs.open SQL, sconnection if (rs.eof) then utime = TimeValue(now()) else utime = TimeValue(DateAdd("h",(rs("GMTOffset")+6), now())) end if rs.close select case (minute(utime)) case 1,2,3,4,5,6,7,8,9,10,11,12,13,14 utime = FormatDateTime(DateAdd("n",(15-minute(utime)),utime),4) case 16,17,18,19,20,21,22,23,24,25,26,27,28,29 utime = FormatDateTime(DateAdd("n",(30-minute(utime)),utime),4) case 31,32,33,34,35,36,37,38,39,40,41,42,43,44 utime = FormatDateTime(DateAdd("n",(45-minute(utime)),utime),4) case 46,47,48,49,50,51,52,53,54,55,56,57,58,59 utime = FormatDateTime(DateAdd("n",(60-minute(utime)),utime),4) case else utime = FormatDateTime(utime,4) end select VG.RvSet $RV_LINEID, "CheckInTime", utime SQL = "UPDATE servicecalls SET status = 'In Progress', timeIn = '" & utime & "' WHERE scID = $RV[sCID] AND techID = $RV[TechID] AND status = 'Assigned'" sconnection.Execute SQL VG.Script_Goto $RV_LINEID,"", "UpdatedRec" set VG = nothing set rs = nothing sconnection.close set sconnection = nothing Share this post Link to post
SupportTeam Report post Posted 10/04/2006 09:00 PM Does this method allow the remaining code of the script to execute?Yes. Does it behave like a "GOTO" and jump into the module specified?Yes. You may want to try closing the connection before jumping to another module. Like this: ... set rs = nothing sconnection.close set sconnection = nothing VG.Script_Goto $RV_LINEID,"", "UpdatedRec" set VG = nothing If you can post a trace capturing an example of a problem you encountered we can see if the trace shows up any hints as to what may be happening. Enable logging by setting the log levels to 10 in VG.INI as per below: [Log] VoiceGuide=10 NumberLoader=0 VoicemailManager=0 EmailSender=0 TapiWrapOcx=10 SapiWrapOcx=0 Then restart VG and make a test call which demonstrates the problem. Debug 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
tsimek Report post Posted 10/05/2006 06:43 PM We are running a 12 channel dialogic board. Does that change what's to be adjusted in the INI file? Share this post Link to post
SupportTeam Report post Posted 10/05/2006 10:24 PM We are running a 12 channel dialogic board. Does that change what's to be adjusted in the INI file?No. The VG.INI changes mentioned in previous post relate to enabling the logging. Logging is enabled the same way for a 1 line system as it would for a 300 line system... Share this post Link to post