VoiceGuide IVR Software Main Page
Jump to content

Dbinsert Error

Recommended Posts

I get the below error when I have a very long text string I pass for TTS conversion in a Play module. Is there a limit in the string size?

 

Jeff

 

 

 

115553.945 17 2 CallData.dateCallStartTime=5/18/2009 11:55:40 AM

115553.945 17 2 rv add [CallHangupTime]{2009-05-18 11:55:53}

115553.945 17 2 WriteCDRlogs: begin (campaign=MDDOH-qwerty, CallData.iLineId=2)

115553.945 17 2 writing CDR logs

115553.945 17 2 cdr.sDisposition=ANSWERED

115553.945 17 2 NOTE strDialoutTelNbr=18187314522, strCallerIdNbr=

115553.945 17 2 VG.INI/Log/CDR_LastData_SaveRv=1 - RVs XML will be saved in LastApplicationData CDR field.

115553.945 17 2 CDR (out) : "MDDOH-qwerty","18187314522","","","","0","","C:\Program Files\VoiceGuide\Scripts\MDDeptOfHealthNoETA.vgs","<GreetingToPlay>This is the Maryland Health Alert Network calling with an Update from The Frederick County Health Department.</GreetingToPlay><MessageToPlay>Last week the CDC activated its Emergency Operations Center to augment the CDC ongoing investigation of human cases of swine influenza A (H1N1). As of Monday, April 27th, 2009, 40 human cases of this novel virus infection have been identified in the United States. CDC is working very closely with officials in states where human cases of swine influenza A (H1N1) have been identified, as well as with health officials in Mexico, Canada and the World Health Organization. This includes the deployment of CDC personnel to aid epidemiological efforts in California and Texas and to support Mexico's Ministry of Health.</MessageToPlay><PIN>7766</PIN><OutDial_RetriesLeft>2</OutDial_RetriesLeft><$RV_STARTTIME>2009-05-18 11:55:48</$RV_STARTTIME><$RV_DEVICEID>2</$RV_DEVICEID><DlgcVoice>dxxxB1C1</DlgcVoice><DlgcNetwork>dtiB1T1</DlgcNetwork><$RV_CALLEDNUMBER>18187314522</$RV_CALLEDNUMBER><scriptStart_Time>2009-05-18 11:55:48</ScriptStart_Time><scriptStart_CalledFrom_Module>SayDate</ScriptStart_CalledFrom_Module><Hangup Source>LINECALLSTATE_DISCONNECTED</Hangup Source><CallHangupTime>2009-05-18 11:55:53</CallHangupTime>","2009-05-18 11:55:40","2009-05-18 11:55:48","2009-05-18 11:55:53",13,6,"ANSWERED",""

115553.945 17 2 CDR SQL: INSERT INTO CdrOut (Account, Src, Dst, Dcontext, Clid, Channel, Dstchannel, Lastapp, Lastdata, Start, Answer, Hangup, Duration, Billsec, Disposition, Amaflags) VALUES ('MDDOH-qwerty','18187314522','','','','0','','C:\Program Files\VoiceGuide\Scripts\MDDeptOfHealthNoETA.vgs','<GreetingToPlay>This is the Maryland Health Alert Network calling with an Update from The Frederick County Health Department.</GreetingToPlay><MessageToPlay>Last week the CDC activated its Emergency Operations Center to augment the CDC ongoing investigation of human cases of swine influenza A (H1N1). As of Monday, April 27th, 2009, 40 human cases of this novel virus infection have been identified in the United States. CDC is working very closely with officials in states where human cases of swine influenza A (H1N1) have been identified, as well as with health officials in Mexico, Canada and the World Health Organization. This includes the deployment of CDC personnel to aid epidemiological efforts in California and Texas and to support Mexico's Ministry of Health.</MessageToPlay><PIN>7766</PIN><OutDial_RetriesLeft>2</OutDial_RetriesLeft><$RV_STARTTIME>2009-05-18 11:55:48</$RV_STARTTIME><$RV_DEVICEID>2</$RV_DEVICEID><DlgcVoice>dxxxB1C1</DlgcVoice><DlgcNetwork>dtiB1T1</DlgcNetwork><$RV_CALLEDNUMBER>18187314522</$RV_CALLEDNUMBER><scriptStart_Time>2009-05-18 11:55:48</ScriptStart_Time><scriptStart_CalledFrom_Module>SayDate</ScriptStart_CalledFrom_Module><Hangup Source>LINECALLSTATE_DISCONNECTED</Hangup Source><CallHangupTime>2009-05-18 11:55:53</CallHangupTime>','2009-05-18 11:55:40','2009-05-18 11:55:48','2009-05-18 11:55:53',13,6,'ANSWERED','')

115553.945 17 2 sIni_CDRLOG_ODBC_ConnectString not set. CDR not saved to database.

115553.945 10 0 Db_LogCdr assign sql

115553.945 17 2 after hangup script: []

115553.945 10 0 Db_LogCdr ExecuteNonQuery call

115553.945 17 2 AfterHangup script not set.

115553.945 17 2 OnIDLE_CleanupAfterAllScritpsCompletedAndReleaseCall start

115553.945 17 2 WriteToLogFiles_CurrScriptOnly begin

115553.945 17 WriteToLogFiles_DoWrite begin : strLogFnameLessSuffix=C:\Program Files\VoiceGuide\Scripts\MDDeptOfHealthNoETA

115553.945 17 WriteToLogFiles_DoWrite : log subdirectory does not exist: C:\Program Files\VoiceGuide\Scripts\log

115553.945 17 2 LineState_Reinit_AndReleaseCall: crn=280027e

115553.945 17 2 LineState_Reinit_CleanLineState : begin

115553.945 17 2 strThisCallIsInboundOrOutbound clear. (LineState_Reinit_CleanLineState)

115553.945 17 2 t set 2 EV_TIMEOUT_AFTERIDLE_ALLOWOUT

115553.945 17 2 LineState_Reinit_CleanLineState : end

115553.945 10 0 ERROR v7.0.3200.20366 (Sun 05/10/2008 11:18:51.78) DbInsert ExecuteNonQuery error. : Incorrect syntax near 's'.

Unclosed quotation mark after the character string ',')'.

 

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)

at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

at ..(Object sender, args)

115553.945 17 2 tqTel que cmd_ReleaseCall [0,0,0][0||]

115553.945 17 2 t set 2 EV_TIMEOUT_AFTERIDLE_ALLOWOUT

115553.945 7 2 tqTel run cmd_ReleaseCall

 

Share this post


Link to post

There is no limit on the string length in the SQLServer database (see the table schema for the CdrOut table).

The error is shown in the trace:

115553.945 10 0 ERROR v7.0.3200.20366 (Sun 05/10/2008 11:18:51.78) DbInsert ExecuteNonQuery error. : Incorrect syntax near 's'.
Unclosed quotation mark after the character string ',')'.

Looks like the apostrophe in the:

Mexico's Ministry of Health

is making the SQL query invalid. Looks like VoiceGuide is not sanitizing the inputs properly (it was not cleaning out single quotes while it was cleaning out the double quotes).

This version of VoiceGuide fixes this: [old link removed]

Above version deletes the single quotes as well as double quotes from the SQL input before running the SQL to save data to CDR log tables.

NB. The above issue would not have affected the saving of the CDR records to the text based CDR logs files in VoiceGuide's \cdr\ subdirectory. The CDR records would still have been written there.

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
×