vatsal Report post Posted 03/06/2003 06:43 PM Help would be much appreciated, I have been trying to get to grips with the basics of the IVR interacting with a database, in this case Access. I have been able to use the Help to get the IVR to query the database for information, However, I am having a problem making changes to a record in the a table. I am able to read the table data without any problem, but for some reason I have been unable to make changes to a record in the field. I'm using Access, Below is the command line I'm using UPDATE Products SET Unitsinstock=$RV[Get New Stock] WHERE ProductID=$RV[Get Product Code] [Get New Stock] is a created in a module prior to the database query module above. Below is the log Where am I going wrong.....I'm sure it it is something realy obvious! Regards Vatsal 21906 0 tapie callstate OFFERING 65778 0 4 21906 0 tapie ring 1 24901 0 tapie ring 2 24901 0 Answer the call 24901 0 lineAnswer(65778) => 66307 24911 0 tapie callstate ACCEPTED 65778 0 0 26213 0 tapi Reply 66307 0 26223 0 tapie callstate CONNECTED 65778,0,0 26223 0 WorkingModeTAPI= 26223 0 WorkingModeScript= 26223 0 TimeoutClear 26223 0 [select Query] Playing 26223 0 [select Query] Playing (C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\Welcome to smsassist.wav) 26273 0 PlaySoundStart ok [C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\Welcome to smsassist.wav] 26273 0 TimeoutClear 26273 0 RunModule PLAY end 26273 0 wa(6316,82622300) 32602 0 Play End line[0] (id=826223) 32602 0 LsPlayMsg EV_PLAY_FINISHED 32602 0 TimeoutSet 10 EV_TIMEOUT_HANGUP 32612 0 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 32612 0 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 32622 0 TimeoutClear 32622 0 [Get Product Code] Number Input 32632 0 [Get Product Code] Playing (C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\T&C.wav) 32682 0 PlaySoundStart ok [C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\T&C.wav] 32682 0 TimeoutClear 32682 0 wa(11756,83263200) 35005 0 tapie monitordigits 51 2 35005 0 LsGetNbrsPlayWelcMsg [3] 35596 0 PlaySoundStop ok 35606 0 [Get Product Code] Number Input 3 35606 0 LsGetNbrsRxDigits [#] 35606 0 TimeoutClear 35616 0 fn PlaySoundStartNumbers C:\Program Files\ivg\system\voice\GetNbrsConfirmIntro.wav, C:\Program Files\ivg\system\voice\GetNbrsConfirmMenu.wav, 3, Digits 35626 0 twcal PlaySayNumber C:\Program Files\ivg\system\voice\GetNbrsConfirmIntro.wav, C:\Program Files\ivg\system\voice\GetNbrsConfirmMenu.wav, 3, , 1 35676 0 PlaySoundStartNumbers ok 35676 0 TimeoutClear 35676 0 wa(8791,83562602) 44489 0 Play End line[0] (id=835626) 44489 0 LsGetNbrsPlayConfirm EV_PLAY_FINISHED 44499 0 TimeoutSet 5 EV_TIMEOUT_REPLAYMSG 44879 0 tapie monitordigits 49 2 44879 0 LsGetNbrsPlayConfirm [1] 44879 0 PlaySoundStop ok 44889 0 TimeoutClear 44889 0 [Access Query] DB Query 44899 0 Jet mode used (To use ODBC mode specify ODBC Connect string) 44910 0 RVreplace start: [sELECT UnitsinStock, UnitPrice FROM Goods WHERE ProductID=$RV[Get Product Code]] 44910 0 RVreplace end: [sELECT UnitsinStock, UnitPrice FROM Goods WHERE ProductID=3] 44910 0 About to execute Retrieve Operation [sELECT UnitsinStock, UnitPrice FROM Goods WHERE ProductID=3] 44920 0 [Access Query] row count=1 44930 0 TimeoutClear 44930 0 RVreplace start: [$RV[Access Query_1_1]] 44940 0 RVreplace end: [145] 44940 0 [say Stock Count Access] Say numbers: 145 as Digits 44950 0 fn PlaySoundStartNumbers , , 145, Digits 44950 0 twcal PlaySayNumber , , 145, , 1 44990 0 PlaySoundStartNumbers ok 45000 0 TimeoutClear 45000 0 wa(1973,84495002) 46982 0 Play End line[0] (id=844950) 46992 0 LsSayNbrPlay EV_PLAY_FINISHED 46992 0 TimeoutSet 10 EV_TIMEOUT_HANGUP 46992 0 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 47003 0 LsSayNbrPlay EV_TIMEOUT_GOTOMODULE 47003 0 TimeoutClear 47013 0 RVreplace start: [$RV[Access Query_2_1]] 47013 0 RVreplace end: [45] 47023 0 [say Price Access] Say numbers: 45 as Amount Cents, Decimal Point 47023 0 fn PlaySoundStartNumbers , , 45, Amount Cents, Decimal Point 47033 0 twcal PlaySayNumber , , 4500, , 12 47073 0 PlaySoundStartNumbers ok 47083 0 TimeoutClear 47083 0 wa(3901,84703304) 50998 0 Play End line[0] (id=847033) 50998 0 LsSayNbrPlay EV_PLAY_FINISHED 50998 0 TimeoutSet 10 EV_TIMEOUT_HANGUP 51008 0 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 51008 0 LsSayNbrPlay EV_TIMEOUT_GOTOMODULE 51018 0 TimeoutClear 51018 0 [Get New Stock] Number Input 51028 0 [Get New Stock] Playing (C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\amendprice.wav) 51068 0 PlaySoundStart ok [C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\amendprice.wav] 51078 0 TimeoutClear 51078 0 wa(2766,85102800) 53852 0 Play End line[0] (id=851028) 53862 0 LsGetNbrsPlayWelcMsg EV_PLAY_FINISHED 53862 0 TimeoutSet 10 EV_TIMEOUT_HANGUP 53872 0 TimeoutSet 10 EV_TIMEOUT_GOTOMODULE 54664 0 tapie monitordigits 50 2 54664 0 LsGetNbrsRxDigits [2] 54674 0 [Get New Stock] Number Input 2 54674 0 TimeoutSet 10 EV_TIMEOUT_GOTOMODULE 55815 0 tapie monitordigits 51 2 55815 0 LsGetNbrsRxDigits [3] 55825 0 [Get New Stock] Number Input 23 55825 0 TimeoutSet 10 EV_TIMEOUT_GOTOMODULE 65749 0 Timer fired EV_TIMEOUT_GOTOMODULE 65749 0 LsGetNbrsRxDigits EV_TIMEOUT_GOTOMODULE 65759 0 TimeoutClear 65759 0 [Play 4] Playing 65769 0 [Play 4] Playing (C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\commandfailed.wav) 65810 0 PlaySoundStart ok [C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\commandfailed.wav] 65820 0 TimeoutClear 65820 0 RunModule PLAY end 65820 0 wa(2396,86576900) 68233 0 Play End line[0] (id=865769) 68233 0 LsPlayMsg EV_PLAY_FINISHED 68233 0 TimeoutSet 10 EV_TIMEOUT_HANGUP 68243 0 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 68243 0 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 68253 0 TimeoutClear 68253 0 [select Query] Playing 68263 0 [select Query] Playing (C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\Welcome to smsassist.wav) 68313 0 PlaySoundStart ok [C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\Welcome to smsassist.wav] 68313 0 TimeoutClear 68313 0 RunModule PLAY end 68323 0 wa(6316,86826300) 74652 0 Play End line[0] (id=868263) 74652 0 LsPlayMsg EV_PLAY_FINISHED 74652 0 TimeoutSet 10 EV_TIMEOUT_HANGUP 74662 0 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 74662 0 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 74672 0 TimeoutClear 74672 0 [Get Product Code] Number Input 74682 0 [Get Product Code] Playing (C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\T&C.wav) 74732 0 PlaySoundStart ok [C:\Program Files\ivg\Scripts\04MAR2003 IVR SMS ASSIST\T&C.wav] 74732 0 TimeoutClear 74732 0 wa(11756,87468200) 82373 0 LsGetNbrsPlayWelcMsg EV_TIMEOUT_HANGUP 83054 0 PlaySoundStop ok 83064 0 Hanging up call... 83064 0 TimeoutSet 2 EV_TIMEOUT_WAITFORIDLEAFTERLINEDROP 83064 0 PlaySoundStop ok 83074 0 fnHangupCall end 83245 0 tapie callstate DISCONNECTED 65778,1,0 83245 0 LsAwaitingCalls EV_REMOTEPARTY_DISCONNECT 83255 0 PlaySoundStop ok 83255 0 Hanging up call... 83265 0 TimeoutSet 2 EV_TIMEOUT_WAITFORIDLEAFTERLINEDROP 83265 0 PlaySoundStop ok 83265 0 fnHangupCall end 83275 0 tapie callstate IDLE 65778 0 0 83275 0 WorkingMode@Idle= 83285 0 TimeoutClear 83285 0 TimeoutSet 1 EV_TIMEOUT_TIMETOREINITLINE 83295 0 tapi Reply 65948 0 83295 0 tapi Reply 65982 0 84196 0 Timer fired EV_TIMEOUT_TIMETOREINITLINE 84196 0 LsAwaitingCalls EV_TIMEOUT_TIMETOREINITLINE 84206 0 Initialise telephony (due to IDLE) 84206 0 tapic lineDeallocateCall(MainCall:65778) 0 85027 0 Waiting for a call... 85037 0 hLine=65931 85037 0 TimeoutSet 5 EV_TIMOUT_ATERIDLE_ALLOWOUT 90044 0 Timer fired EV_TIMOUT_ATERIDLE_ALLOWOUT Share this post Link to post
SupportTeam Report post Posted 03/07/2003 02:27 AM The trace did not show the UPDATE statement executed... I would try running the SQL query first from an SQL Query tool - and once it works then copy the query into VoiceGuide. There are many various SQL Query tools around. (BTW: in your database is ProductID an integer field or a string field?) Share this post Link to post