I try to use cfqueryparam for a little better performance(I'll be converting
to a stored proc in a bit).
I've used it with no prob for selects, but can you use it for an INSERT or
UPDATE statement?
After running the query below, the DB is storing an actual "?" for the
values, rather than the actual values sent. The debug info shows the
correct values being sent.
<cfquery name="qry_insertNew" datasource="deersData" dbtype="ODBC">
INSERT INTO loginInfo (ssn, lastName, birthDate,
lastVerified)
Values ('<cfqueryparam value="#attributes.SSN#"
cfsqltype="CF_SQL_VARCHAR" maxlength="50">', '<cfqueryparam
value="#attributes.lastName#" cfsqltype="CF_SQL_VARCHAR" maxlength="50">',
'<cfqueryparam value="#attributes.birthdate#" cfsqltype="CF_SQL_VARCHAR"
maxlength="50">', #CreateODBCDateTime(now())#)
</cfquery>
DEBUG INFO:
qry_insertNew (Records=0, Time=16ms)
SQL =
INSERT INTO loginInfo (ssn, lastName, birthDate, lastVerified, hits)
Values ('?', '?', '?', {ts '2002-07-31 16:00:41'},
?)
Query Parameter Value(s) -
Parameter #1 = 123456789
Parameter #2 = Davis
Parameter #3 = 19430214
Parameter #4 = 1
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists