[thelist] Update Query not running
.jeff
jeff at members.evolt.org
Tue Jan 22 14:30:52 CST 2002
scott,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Scott Brady
>
> 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).
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
have you verified that request.usertbl is pointing to the correct table?
do you have debugging turned on and can see the full sql string being sent
to the database? if so, does it look right?
what's the datatype of the user_id column? is it varchar or numeric? if
it's numeric, try a cfsqltype of "cf_sql_numeric" instead.
good luck,
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list