I have a template that strips out HTML code from a string. It then takes the
first 255 chars to create a blurb that is used as a summary in a verity
collection. When I try to insert the blurb in the DB, I get the following
SQL error:
ODBC Error Code = 37000 (Syntax error or access violation)
[MERANT][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before
the character string 'It is important that community policies and procedures
be enforced uniformly and consistently.'.
SQL = "INSERT INTO sections (secNumber, secName, chapID, blurb)
VALUES (620, 'Enforcing Community Policies', 6, 'It is important that
community policies and procedures be enforced uniformly and consistently.
Residents will then have a clear understanding of their responsibilities, as
well as those of Management. The Resident Handbook, which all residents
ar')"
Why do I get this error. The SQL looks OK to me, the "blurb" looks ok in the
error message, and I cannot find the unclosed quotation marks anywhere. I
have tried wrapping the blurb variable in PreserveSingleQuotes(), to no
avail. Any ideas.
Here is the insert code:
<cfquery name="insertSection" datasource="#request.site.mainDSN#">
INSERT INTO sections
(secNumber, secName, chapID, blurb)
VALUES
(#attributes.secNumber#, '#attributes.secName#',
#attributes.chapID#, '#attributes.blurb#')
</cfquery>
Marwan Saidi
Webmaster
CED - Concord IS
[EMAIL PROTECTED]
407.741.8645
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists