When do you have to escape singles quotes (or use PreserveSingleQuotes)?

For example, I don't find I need to do either inserting a record using the
following (with SQL7):

<cfquery name="AddRow" datasource="MainBiz" password="" username="sa">
INSERT INTO Orgs
(ID, Class, Contact, org_name, org_add, City, State, Zip, Telephone, Credit)
VALUES
(#max_id#, '#Session.ClassNumber#', '#Form.Contact#', '#Form.org_name#', 
'#Form.org_add#', '#Form.City#', '#Form.State#', '#Form.Zip#', 
'#Form.Telephone#', '#Session.Credit#')
</cfquery>

I also don't find I need to escape single quotes in SQL7 Query Analyzer 
using the following:

BULK INSERT Victor
FROM 'D:\4879000.csv'
WITH
(
FIELDTERMINATOR=',',
ROWTERMINATOR='
'
)

However, I do need to escape single quotes with SQL7 using Query Analyzer 
when I insert a single row where the entire record to be inserted is 
written out in Query Analyzer.

Where do I need to escape singles quotes (or use PreserveSingleQuotes)
using ColdFusion?

best,  paul

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to