I'm using CF 4.5. Can't figure out why this would happen. I have an SP with an insert statement. Everything works fine except for parentheses and double quotes. This happened in more then one SP and/or page. It's an intranet site so I was able to make a rule that parenthesis and double quotes are not allowed in free text areas. Well now; I have run into a situation where I have to allow them.
So has anyone ever run into a situation where parentheses and double quotes would cause an error in the insert?
This is the error.......................
ODBC Error Code = S1000 (General error)
[MERANT][ODBC Sybase driver][SQL Server]Unclosed quote before the character string 'false'.
SQL = "{call s_it_tt_update '23061 ', '2002080074P', 'IT Work', 'All work associated with Imations/DSS (cquisition', '04/20/2003', 0.0, 1, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 'INSERT', 'false'}"
This is part of the CF code..................
<CFSET varSrProj=FORM["hdnSrProj_#xcnt#"]>
<CFSET varProjWeek=FORM["totProjWeek_#xcnt#"]>
<CFSET varSun=FORM["txtSun_#xcnt#"]>
<CFSET varMon=FORM["txtMon_#xcnt#"]>
<CFSET varTue=FORM["txtTue_#xcnt#"]>
<CFSET varWed=FORM["txtWed_#xcnt#"]>
<CFSET varThr=FORM["txtThr_#xcnt#"]>
<CFSET varFri=FORM["txtFri_#xcnt#"]>
<CFSET varSat=FORM["txtSat_#xcnt#"]>
<CFIF #Variables.varSrProj# GT ""
AND #Variables.varProjWeek# GT 0>
<cfset variables.addedtotemplate = 'true'>
<CFSET varType=FORM["txtType_#xcnt#"]>
<CFSET varDesc=FORM["hdndesc_#xcnt#"]>
<cfquery datasource="gvdb" name="saveChanges">
{call s_it_tt_update '#variables.locUid#', '#Variables.varSrProj#', '#Variables.varType#',
'#Variables.varDesc#', '#FORM.xxtend#',
#variables.varSun#, #variables.varMon#,
#variables.varTue#, #variables.varWed#,
#variables.varThr#, #variables.varFri#,
#variables.varSat#, 0, 'INSERT', <CFIF isdefined('FORM.chkSaveTemplate')>'true'<CFELSE>'false'</CFIF>}
</cfquery>
This is the SP..........................................
CREATE PROCEDURE dbo.s_it_tt_update
@uid CHAR(10),
@activity CHAR(30),
@acttype CHAR(25),
@description CHAR(50),
@weekdate smalldatetime,
@sunday numeric(9,2),
@monday numeric(9,2),
@tuesday numeric(9,2),
@wednesday numeric(9,2),
@thursday numeric(9,2),
@friday numeric(9,2),
@saturday numeric(9,2),
@rowid numeric(10,0),
@ioru CHAR(10),
@updateTemplate CHAR(5)
AS
BEGIN
IF @ioru = "UPDATE"
BEGIN
UPDATE it_tt_activity
SET acttype=@acttype, activity=@activity, description=@description,
entry_date=GETDATE(), week_date=@weekdate, sunday=@sunday, monday=@monday,
tuesday=@tuesday, wednesday=@wednesday, thursday=@thursday, friday=@friday,
saturday=@saturday
WHERE rowid=@rowid
END
IF @ioru = "INSERT"
BEGIN
-- Insert the record
INSERT INTO it_tt_activity(uid, acttype, activity, description, entry_date,
week_date, sunday, monday, tuesday, wednesday, thursday,
friday, saturday)
VALUES (@uid, @acttype, @activity, @description, GETDATE(),
@weekdate, @sunday, @monday, @tuesday, @wednesday, @thursday,@friday, @saturday)
END
IF @updateTemplate='true'
BEGIN
-- Insert the record
INSERT INTO it_tt_acttemplate(uid, acttype, activity, description, entry_date, week_date, sunday, monday, tuesday, wednesday, thursday, friday, saturday)
VALUES (@uid, @acttype, @activity, @description, GETDATE(),
@weekdate, @sunday, @monday, @tuesday, @wednesday, @thursday, @friday, @saturday)
END
END
Thanks in advance for your input.