[thelist] Update Query not running

Scott Brady evolt at scottbrady.net
Tue Jan 22 13:50:23 CST 2002


I've got an Access table where the unique ID is a UID and I'm trying to run
an update query (using ColdFusion 5) on it, for example:

 UPDATE
  #Request.userTbl#
 SET
  email = <cfqueryparam value="#attributes.email#"
cfsqltype="CF_SQL_VARCHAR">,
  first_name = <cfqueryparam value="#attributes.first_name#"
cfsqltype="CF_SQL_VARCHAR">,
  last_name = <cfqueryparam value="#attributes.last_name#"
cfsqltype="CF_SQL_VARCHAR">
 WHERE
  user_id = <cfqueryparam value="#Request.user_id#"
cfsqltype="CF_SQL_LONGVARCHAR">

If I take the WHERE clause out, the update runs (of course, it runs on every
row, but it does run).

With the WHERE clause, the query doesn't update any rows (I'm not getting
any errors).

However, if I do a SELECT query on that table:

 SELECT *
 FROM #Request.userTbl#
 WHERE
  user_id = <cfqueryparam value="#Request.user_id#"
cfsqltype="CF_SQL_LONGVARCHAR">

(I'm using SELECT * just for this test query), it runs and returns the
proper record.

I thought maybe it was the cfsqltype in the query param, but if that were
the case, the SELECT query wouldn't run, right?

Any ideas?

Thanks!

Scott
----------------------------------------------
Scott Brady
http://www.scottbrady.net/







More information about the thelist mailing list