VoiceGuide IVR Software Main Page
Jump to content

VG And MySql - ODBC not working on restart

Recommended Posts

Hello!

 

I have noticed that sometimes when I reboot my computer and call one of my scripts, I get the message; ERROR connecting to the database. I am for sure that no change has been made in the script itself, neither in the MySQL driver.

 

How do I solve this situation? Well, if I close VG and inmediately I start it again then it works BUT I wonder if there is something to avoid this situation; for example wait x minutes before starting VG after rebooting the system.

 

Please help!

 

jose

Share this post


Link to post

Maybe the MySQL service takes a bit longer to start? If that's the case then delaying the start of VG until after the MySQL database starts would be the right approach.

Share this post


Link to post

After the last mail I´ve seen that this may happen even if I didn´t restart the computer, but again if I close VG and then I start it again then it works fine.

 

Any ideas?

Jose

Share this post


Link to post

A "Database Query" module makes a new connection to the database every time it's visited, and after it's finished the DB connection is closed, so the timing of when the VoiceGuide app itself is started doe not really matter.

 

this may happen even if I didn´t restart the computer
Are you saying that you are seeing that all of a sudden the database connection does not work work?

 

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=0

SapiWrapOcx=0

Then restart VG/system and make a test call which demonstrates the problem, and then do the VG restart and make a call which results in a successfull DB Query.

 

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

Hello again!

 

Now I know that when I start Voiceguide with the script attached with this post then for some reason I always get this message:

"ERROR 6.0.3095 OpenDatabase [3146:ODBC: anrop misslyckades.]"

 

but if I start voiceguide by pressing the VoiceGuide icon then it works. I´ve checked the properties and when pressing this icon it will start the program C:\Program\VoiceGuide\VgMulti.exe just like in my script (see attached file)? I need this script in my computer in order to start this and other applications after a power failed.

 

What am I missing?

 

Thank you for your help!

jose

1024vgm.zip

Share this post


Link to post

Does the ODBC driver log indicate anything?

 

Maybe the way you start the VgMulti.exe has something to do with it. I see that "Win32_ScheduledJob" object is used to start VG. Try just doing a simple Shell to start VgMulti.exe (with some delay beforehand to let the Dialogic service and Databases etc. to start before starting VG)

Share this post


Link to post
Does the ODBC driver log indicate anything?

 

Where can I see that log?

 

Try just doing a simple Shell to start VgMulti.exe (with some delay beforehand to let the Dialogic service and Databases etc. to start before starting VG)

 

I have this problem even without rebooting the computer. The first time I discovered this problem was after rebooting the computer. But now I am sure that those services you mentioned aboved are running when I execute my script and for some reason I can´t connect to the database. So I have to close the voiceguide application and start it again by pressing the voiceguide icon instead.

 

What can I do?

 

\Jose

Share this post


Link to post

Most ODBC drivers have some logging - you should check the ODBC driver documentation.

 

Sounds like using "Win32_ScheduledJob" object is used to start VG causes some problems with the ODBC drivere.. Try just doing a simple Shell call to start VgMulti.exe.

Share this post


Link to post
Try just doing a simple Shell call to start VgMulti.exe.

 

I don´t really understand what you mean by simple Shell call? Do you mean a batch file?

 

I´d appreciate if you can point me in the right direction!

 

\Jose

Share this post


Link to post

Here are as few code snippets which may point in the right direction:

 

Snippet 1:

 

Set sh = CreateObject("WScript.Shell")

Set wsx = sh.Exec("VgMulti.exe")

 

 

Snippet 2:

 

Set objShell = CreateObject("Wscript.Shell")

objShell.Run "VgMulti.exe"

 

 

Snippet 3:

 

Const NORMAL_WINDOW = 1

Set objShell = CreateObject("Shell.Application")

objShell.ShellExecute "VgMulti.exe", "", , , NORMAL_WINDOW

Share this post


Link to post

Thank you about that. It works fine now.

 

Sounds like using "Win32_ScheduledJob" object is used to start VG causes some problems with the OPDBC drivere

 

The problem with the task scheduler is that it starts voiceguide with the "SYSTEM" as the user account instead of my own account.

 

Thank you again!

\Jose

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
×