I've got an Access table where the unique ID is a UID and I'm trying to run
an update query 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/

______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to