VoiceGuide IVR Software Main Page
Jump to content

Version 7 Database Connectivity

Recommended Posts

I have tried for days to get any of my databases to connect to the new version. I have not had any luck.

 

I have tried to connect to a MSSQL server, and then failing that to a MySQL server.

 

I have tried reinstalling MDAC, MySQL database connector... I am running out of things to try. Could this be an issue with my VG installation?

 

I am attaching log files. Please delete them after you look at them.

 

 

104911.097 9 1 db odbc m_strOleDbConnectString modified to be: UID=root;PWD=password;;DBQ=VGIVR;

104911.097 9 1 db odbc thread init.

104911.097 9 1 db odbc thread started.

104911.097 18 1 db odbc connection create call.

104911.097 18 1 db odbc connection open call.

104911.112 18 1 ERROR 7.0.2818.37014 ConnectAndRun_Odbc : ERROR [iM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)

at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)

at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnect

on owningConnection, DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.Odbc.OdbcConnection.Open()

at ..()

 

 

The errors general state that the data source name is not found, even though it matches perfectly. I have deleted all of my ODBC setups and have re-made them multiple times. Any insight you can provide would be appreciated.

Share this post


Link to post

Maybe you did not use the right ODBC driver?

 

The trace you supply suggests that the script is not referencing an ODBC Data Source.

 

You need to reference an ODBC Data Source. Filenames can oly be used for MSAccess and MSExcel conenctions.

 

The Data Source should be a 'System' Data Source in order to be accessible by the VoiceGuide service.

 

Just tried against our test MySQL setup here and it worked fine on our test box. Here is what we did:

 

Used the MySQL ODBC 3.51 driver. (download from mysql.com). Created a System DSN named "NortWindDev7"

 

Connect string:

 

ODBC;Driver={MySQL ODBC 3.51 Driver};Server=10.1.1.8;Port=3306;Database=nwind;User=voiceguide;Password=voiceg

ide;Option=3;

 

(The MySQL DB on server at 10.1.1.8 had the MS demo Northwind database imported into it, and DB was named nwind)

 

I attach the script which we used, and the relevant trace extract is below. See how the first names of Northwind employees is read back using TTS.

 

Test was made using latest development version: vgEngine v7.0.2826.34968 (Thu 27/09/2007 18:25:37.59) but the DB section has not been touched for a while now.

VoIP system was used but that would not affect the database interaction.

 

MySQL was on machine at 10.1.1.8, VoiceGuide was on machine at 10.1.1.9, and VoIP call came from 10.1.1.4

 

If you continue having problems please post your script as well and details of your ODBC driver setup.

 

 

 

191241.482 6 12 state [MySqlDev7] DB Query

191241.482 6 12 strDirOfDb=, altering strDatabaseName to: C:\ProjectsVgNet\bin\Scripts\Credit Card Payment\NortWindDev7

191241.482 6 12 db strDbConnectString=[ODBC;Driver={MySQL ODBC 3.51 Driver};Server=10.1.1.8;Port=3306;Database=nwind;User=voiceguide;Password=voiceg

ide;Option=3;]

191241.482 6 12 db using odbc interface: OdbcConnection

191241.482 6 12 timer set 5 EV_TIMEOUT_GOTOMODULE

191241.482 6 12 db odbc RunOdbcQuery [MySqlDev7], db=[NortWindDev7], connect=[Driver={MySQL ODBC 3.51 Driver};Server=10.1.1.8;Port=3306;Database=nwind;User=voiceguide;Password=voiceg

ide;Option=3;], sql=[select FirstName, LastName from nwind.employees;]

191241.482 6 12 db odbc m_strOleDbConnectString modified to be: Driver={MySQL ODBC 3.51 Driver};Server=10.1.1.8;Port=3306;Database=nwind;User=voiceguide;Password=voiceg

ide;Option=3;;DBQ=NortWindDev7;

191241.482 6 12 db odbc thread init.

191241.482 6 12 db odbc thread started.

191241.482 16 12 db odbc connection create call.

191241.482 6 12 ev Dialogic 129,TDX_PLAY,291921,0,0,,,

191241.482 16 12 db odbc connection open call.

191241.482 6 12 ScriptEventCode TDX_PLAY, code=129, state=1400

191241.482 6 12 LsDbQuery EV_UNKNOWN_129,TDX_PLAY

191241.482 16 12 db odbc connection open returned.

191241.482 16 12 db odbc DataAdapter.Fill init.

191241.482 16 12 db odbc DataAdapter.Fill call.

191241.482 16 12 db odbc DataAdapter.Fill returned.

191241.482 16 12 rv add [MySqlDev7_FirstName_1]{Nancy}

191241.482 16 12 rv add [MySqlDev7_1_1]{Nancy}

191241.482 16 12 rv add [MySqlDev7_FirstName]{Nancy}

191241.482 16 12 rv add [MySqlDev7_1]{Nancy}

191241.482 16 12 rv add [MySqlDev7_LastName_1]{Davolio}

191241.482 16 12 rv add [MySqlDev7_2_1]{Davolio}

191241.482 16 12 rv add [MySqlDev7_LastName]{Davolio}

191241.482 16 12 rv add [MySqlDev7_2]{Davolio}

191241.482 16 12 rv add [MySqlDev7_FirstName_2]{Andrew}

191241.482 16 12 rv add [MySqlDev7_1_2]{Andrew}

191241.482 16 12 rv add [MySqlDev7_LastName_2]{Fuller}

191241.482 16 12 rv add [MySqlDev7_2_2]{Fuller}

191241.482 16 12 rv add [MySqlDev7_FirstName_3]{Janet}

191241.482 16 12 rv add [MySqlDev7_1_3]{Janet}

191241.482 16 12 rv add [MySqlDev7_LastName_3]{Leverling}

191241.482 16 12 rv add [MySqlDev7_2_3]{Leverling}

191241.482 16 12 rv add [MySqlDev7_FirstName_4]{Margaret}

191241.482 16 12 rv add [MySqlDev7_1_4]{Margaret}

191241.482 16 12 rv add [MySqlDev7_LastName_4]{Peacock}

191241.482 16 12 rv add [MySqlDev7_2_4]{Peacock}

191241.482 16 12 rv add [MySqlDev7_FirstName_5]{Steven}

191241.482 16 12 rv add [MySqlDev7_1_5]{Steven}

191241.482 16 12 rv add [MySqlDev7_LastName_5]{Buchanan}

191241.482 16 12 rv add [MySqlDev7_2_5]{Buchanan}

191241.482 16 12 rv add [MySqlDev7_FirstName_6]{Michael}

191241.482 16 12 rv add [MySqlDev7_1_6]{Michael}

191241.482 16 12 rv add [MySqlDev7_LastName_6]{Suyama}

191241.482 16 12 rv add [MySqlDev7_2_6]{Suyama}

191241.482 16 12 rv add [MySqlDev7_FirstName_7]{Robert}

191241.482 16 12 rv add [MySqlDev7_1_7]{Robert}

191241.482 16 12 rv add [MySqlDev7_LastName_7]{King}

191241.482 16 12 rv add [MySqlDev7_2_7]{King}

191241.498 16 12 rv add [MySqlDev7_FirstName_8]{Laura}

191241.498 16 12 rv add [MySqlDev7_1_8]{Laura}

191241.498 16 12 rv add [MySqlDev7_LastName_8]{Callahan}

191241.498 16 12 rv add [MySqlDev7_2_8]{Callahan}

191241.498 16 12 rv add [MySqlDev7_FirstName_9]{Anne}

191241.498 16 12 rv add [MySqlDev7_1_9]{Anne}

191241.498 16 12 rv add [MySqlDev7_LastName_9]{Dodsworth}

191241.498 16 12 rv add [MySqlDev7_2_9]{Dodsworth}

191241.498 16 12 rv add [MySqlDev7_RowCount]{9}

191241.498 16 12 FindNextVgmTitleInPathList: next module title is=[sayFirstNames]

191241.498 16 12 RunModule vgm=86

191241.498 16 12 timer clear (force=False)

191241.498 16 12 fn RunModule start [Play,[sayFirstNames],86]

191241.498 16 12 state [sayFirstNames] Playing

191241.498 16 12 PrepareAndPlayWavAndTts start iModuleIdx=86, iPlayFileIdx=1, bMakeTtsFile=True, sSoundFileIs=

191241.498 16 12 PrepareAndPlayWavAndTTS sPlayFile=

191241.498 16 12 rv replace start: [$RV[MySqlDev7_FirstName_1], $RV[MySqlDev7_FirstName_2], $RV[MySqlDev7_FirstName_3], $RV[MySqlDev7_FirstName_4], $RV[MySqlDev7_FirstName_5]]

191241.498 16 12 rvns [PathSysVoice]{}[PathApp]{C:\ProjectsVgNet\bin\}[PathDataVm]{C:\ProjectsVgNet\bin\data\}[PathVgSys]{C:\ProjectsVgNet\bin\system\}[scriptPath]{C:\ProjectsVgNet\bin\Scripts\Credit Card Payment\}[scriptsPath]{C:\ProjectsVgNet\bin\Scripts\Credit Card Payment\}[$RV_STARTTIME]{27/09/2007 7:12:40 PM}[$RV_DEVICEID]{12}[DlgcVoice]{dxxxB1C3}[DlgcNetwork]{iptB1T3}[$RV_DNIS]{10.1.1.9:5060}[DNIS]{10.1.1.9:5060}[PathApp]{C:\ProjectsVgNet\bin\}[scriptsPath]{C:\ProjectsVgNet\bin\Scripts\Credit Card Payment\}[$RV_CIDNUMBER]{10.1.1.4:49152}[MySqlDev7_FirstName_1]{Nancy}[MySqlDev7_1_1]{

ancy}[MySqlDev7_FirstName]{Nancy}[MySqlDev7_1]{Nancy}[MySqlDev7_LastName_1]{Davo

io}[MySqlDev7_2_1]{Davolio}[MySqlDev7_LastName]{Davolio}[MySqlDev7_2]{Davolio}[M

SqlDev7_FirstName_2]{Andrew}[MySqlDev7_1_2]{Andrew}[MySqlDev7_LastName_2]{Fuller

[MySqlDev7_2_2]{Fuller}[MySqlDev7_FirstName_3]{Janet}[MySqlDev7_1_3]{Janet}[MySq

Dev7_LastName_3]{Leverling}[MySqlDev7_2_3]{Leverling}[MySqlDev7_FirstName_4]{Mar

aret}[MySqlDev7_1_4]{Margaret}[MySqlDev7_LastName_4]{Peacock}[MySqlDev7_2_4]{Pea

ock}[MySqlDev7_FirstName_5]{Steven}[MySqlDev7_1_5]{Steven}[MySqlDev7_LastName_5]

Buchanan}[MySqlDev7_2_5]{Buchanan}[MySqlDev7_FirstName_6]{Michael}[MySqlDev7_1_6

{Michael}[MySqlDev7_LastName_6]{Suyama}[MySqlDev7_2_6]{Suyama}[MySqlDev7_FirstNa

e_7]{Robert}[MySqlDev7_1_7]{Robert}[MySqlDev7_LastName_7]{King}[MySqlDev7_2_7]{K

ng}[MySqlDev7_FirstName_8]{Laura}[MySqlDev7_1_8]{Laura}[MySqlDev7_LastName_8]{Ca

lahan}[MySqlDev7_2_8]{Callahan}[MySqlDev7_FirstName_9]{Anne}[MySqlDev7_1_9]{Anne

[MySqlDev7_LastName_9]{Dodsworth}[MySqlDev7_2_9]{Dodsworth}[MySqlDev7_RowCount]{

}

191241.498 16 12 rv replace end: [Nancy, Andrew, Janet, Margaret, Steven]

191241.498 16 12 tts generate start[Nancy, Andrew, Janet, Margaret, Steven] C:\ProjectsVgNet\bin\temp\tts_12_1.wav, format=1, iModuleIdx=86, iPlayFileIdx=1

191241.498 16 12 tts generate wait ()

191241.498 16 12 db odbc query completed.

191241.904 6 12 tts generate finish task=0 [C:\ProjectsVgNet\bin\temp\tts_12_1.wav]

191241.904 6 12 tts iPlayWithTts_iModuleIdx=86, iPlayWithTts_iPlayFileIdx=1

191241.904 6 12 state [sayFirstNames] Playing (C:\ProjectsVgNet\bin\temp\tts_12_1.wav)

db_odbc.vgs

Share this post


Link to post

Another approach can be to download the MySQL's OLE DB provider: myOLEDB from http://sourceforge.net/projects/myoledb/

After installing it you would not need to setup an ODBC Data Source, just specify the appropriate connect string.

 

If ODBC is not specified then VoiceGuide uses ADO.NET (OleDbConnection) to connect, so you just need an approapriate ADO.NET connect string for your database. For Connect Strings see http://www.connectionstrings.com/

 

We do however recommend using the ODBC approach. It works and is easy to debug.

 

 

Share this post


Link to post

Thank you! Using your connection string as a model, this works.

 

I don't know why, but on V6 and before, the connection string "ODBC;UID=user;PWD=password;" worked for me. Migrating the same scripts to V7 caused them to fail. I will have to update a many modules, but I am glad to have the correct syntax now.

Share this post


Link to post

v7 uses the ADO.NET 2.0 layer to perform the database connections. v6 uses an older technology. Maybe ADO.NET 2.0 requires the full connection string to be specified?

 

Anyway, good to hear it's working now, please let us know if you have any questions in the future.

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
×