[thelist] Update Query not running

Tab Alleman talleman at RealMetros.com
Tue Jan 22 13:57:57 CST 2002


have you tried printing out your sql statement with the values plugged
in before it tries to run?  sometimes you'll see typos and other
hose-ups that way..

-----Original Message-----
From: Scott Brady [mailto:evolt at scottbrady.net]
Sent: Tuesday, January 22, 2002 2:52 PM
To: thelist at lists.evolt.org
Subject: [thelist] Update Query not running


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/




-- 
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list