invoso.com Report post Posted 05/05/2010 11:10 AM I use other IVR platform and now try migrate to VG. How to realize this kind of SQL query? SELECT kol0{variable1}, reached_number{variable2}, pg_plik{variable3}, kol9{variable4}, placowka_id{variable5} FROM wartosci_wyjsciowe WHERE id=1 I want to use variable later as IVR parameter. Share this post Link to post
SupportTeam Report post Posted 05/05/2010 12:41 PM Do you want to have the returned data saved in variables that can then be used later on in the script? This is done automatically by VoiceGuide. All data returned by database query is saved in 'Result Variables' and you can use them later on. Please read section "Query Results" section of this help file page: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm If you want to have the SQL query modified based on selections made by caller then this van be done by using Result Variables in the SQL query expression. This is very similar to example you quote. eg: if you have a Play module titled "AskForSelection" then key pressed by caller will be saved in $RV[AskForSelection]. And SQL query expression can then be: SELECT column$RV[AskForSelection] FROM sometable WHERE id=1 Please see: http://www.voiceguide.com/vghelp/source/html/resultvariables.htm Share this post Link to post
invoso.com Report post Posted 05/05/2010 12:51 PM How to connect to postgres database direct or with ODBC? In each case how to fill Database Query Properties window (ODBC Data Source, Connect String) My ODBC data source: Data Source: manager Database: manager5 SSL Mode: allow Server: 192.168.0.10 Port: 5432 User Name: abc Password: 123 Share this post Link to post
SupportTeam Report post Posted 05/05/2010 12:54 PM Are you using v6 or v7 or VoiceGuide? For v6 you just need to specify the ODBC data source, and then just specify that source name in the VoiceGuide module. Please see: http://www.voiceguide.com/vghelp/source/html/configodbcdatasource.htm http://www.voiceguide.com/vghelp/source/html/moddbquery.htm v7 uses ADO.NET, so if v7 is used you would need to use connect strings used by ADO.NET drivers. Share this post Link to post
invoso.com Report post Posted 05/05/2010 01:07 PM I wrote: Data Source: manager Connect String: Driver={PostgreSQL Unicode};Server=192.168.0.120;Port=5432;Database=manager5;User=abc;Password=123; I don't see any information in log/0505tw.txt file about database connection. Is possible to turn on trace database connection? Or i should to look in other file searching information about database connection? Share this post Link to post
invoso.com Report post Posted 05/05/2010 06:17 PM I use VG6 and have problem with connection with postgre SQL database. Driver={PostgreSQL UNICODE}; Server=IP address; Port=5432; Database=myDataBase; Uid=myUsername; Pwd=myPassword; returned fail answer. I don't see any information in log files about database connection history, where can I find it? Share this post Link to post
SupportTeam Report post Posted 05/05/2010 08:55 PM Please post the log files capturing the database query module execution. Please .ZIP up the logs before posting them. (and if you like, change any passwords saved in connect string) Share this post Link to post
SupportTeam Report post Posted 05/05/2010 09:00 PM In v6: 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 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
invoso.com Report post Posted 05/06/2010 06:05 AM see attachment export.zip Share this post Link to post
invoso.com Report post Posted 05/06/2010 06:11 AM this is newest script and logs the last one was not right. export.zip Share this post Link to post
invoso.com Report post Posted 05/06/2010 06:30 AM one try again, new ODBC source as system and user DSN, both in one way, both unavailable for VG. export.zip Share this post Link to post
SupportTeam Report post Posted 05/06/2010 07:45 AM We see in traces: 081958,23 4 db Jet mode used (To use ODBC mode specify ODBC Connect string) Please try prefixing the Connect Strings with: ODBC; as per examples here: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm If you still have problems please post traces of calls on which the ODBC; prefix is being used in the connect string. Share this post Link to post
invoso.com Report post Posted 05/06/2010 08:27 AM It moves one step forward, but still returned error in log file. export.zip Share this post Link to post
SupportTeam Report post Posted 05/06/2010 09:23 AM Trace shows that the OpenDatabase comand returned error 3146 This means that the connection cannot be made. This is usually cased by incorrect connection string. Maybe try using User ID instead of Uid and use password instead of Pwd VG v6 uses DAO drivers (OLE DB). See: http://www.connectionstrings.com/postgre-sql Can you run logs on the PostgreSQL ODBC driver itself? Those logs should tell you more why the connection fails. Are you able to try VG v7 instead of VG v6? From trace: 102134,14 4 ERROR 6.0.3391 OpenDatabase [3146:Nieudane wywo³anie ODBC.] Share this post Link to post
SupportTeam Report post Posted 05/06/2010 09:25 AM Another thing to try is to just specify the ODBC data source, and leave the connect string blank. The system looks like it uses the connect string when it is specified, so leave it blank to see if the system will use the data source name instead in that situation. Share this post Link to post
invoso.com Report post Posted 05/07/2010 03:00 PM I reinstalled windows xp (home) sp. 3, DIALOGIC SR_5.1.1_Windows, VoiceGuideDialogic_6.0.0.3391, .NET 2.0 and still can't connect to database. log file shows this same information: 151127,38 4 ERROR 6.0.3391 OpenDatabase [3146:Nieudane wywołanie ODBC.] Can You send me an simple example of working script with connection to ms access database? Share this post Link to post
SupportTeam Report post Posted 05/07/2010 06:51 PM Have you tried to just specify the ODBC data source, and leave the connect string blank? Can you post the traces? Some of the sample scripts installed use MS Access database - please look through the VG's \Scripts\ subdirectory. Have a look at these sample scripts: Customer Enquiry Collections Share this post Link to post
invoso.com Report post Posted 05/07/2010 08:44 PM Script connecting to ms access but my application use postgres database, so I need this kind of connection to push forward my experience and decide to use VG in my business. Share this post Link to post
SupportTeam Report post Posted 05/08/2010 03:34 AM Please post the traces capturing the attempted database connect when the connect string is left blank (with only the data source name being specified). Are you able to test the connection from the Windows ODBC Connection Manager? (where you have defined the data source name). Are you able to run any traces on the ODBC connector itself? Share this post Link to post
invoso.com Report post Posted 05/08/2010 07:17 AM I'm looking someone with experience with postgres and VG connection. Thank's for a help, but it's not enough for me. Postgres database connection is necessary to be VG user. Share this post Link to post
invoso.com Report post Posted 05/08/2010 05:03 PM next question: SELECT id_proj$RV[id_proj] FROM projekty WHERE id_infolinii='11' How to play data from this query? I got an success in this sql query but don't know that a variable $RV[id_proj] is right saved. can you to check script? id_proj - database query and then say numbers pierwszy.zip Share this post Link to post
invoso.com Report post Posted 05/08/2010 05:30 PM I use postgres DB This Connect String working ODBC; Server=server;Database=databaseName;UID=postgres;PWD=password; Share this post Link to post
SupportTeam Report post Posted 05/08/2010 09:43 PM Looking at attached script the query SELECT id_proj$RV[id_proj] FROM projekty WHERE id_infolinii='11' is made from a Database Query module titled id_proj For sake of clarity lets change the name of the Database Query module to: DbRetreieve The data retrieved by module DbRetreieve would be stored in $RV: $RV[DbRetreieve_1_1] As per: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm (section Query Results) Looking at the trace file would let you see the $RVs created during the course of running the script. Also, the $RV[id_proj] is not set anywhere before the database query is made. From looking at the script it looks like you should be using $RV[input] instead? Share this post Link to post
SupportTeam Report post Posted 05/08/2010 09:52 PM As per above, the $RV which you should use in a subsequent Say Numbers module would be: $RV[DbRetreieve_1_1] - if you change the name of the DB Query module to: DbRetreieve Share this post Link to post
invoso.com Report post Posted 05/09/2010 11:06 AM Thank's for Your help. I can now develop VG version of my IVR scenario. next step: I use about 20 sheets in my Telebutler scenario each with 20 - 40 elements. It's good for visibility each modules, how to achieve this in VG? Calling other VG scripts or is option creating parts inside main script? Share this post Link to post
SupportTeam Report post Posted 05/09/2010 12:27 PM It is possible to jump to other VoiceGuide scripts. Please see: http://www.voiceguide.com/vghelp/source/html/paths.htm section: "Branching to other scripts and calling subscripts." Please let us know if you need more information on this (please start a new topic if you do as this is unrealated to databases, and the databases question now looks like is answered). Share this post Link to post