[thelist] CF Question
Thompson, Amy
AThompson at randomhouse.com
Wed May 10 09:22:55 2000
I'm checking the field before I call CFQUERY. The value is 38. Any ideas?
-----Original Message-----
From: Adam Patrick [mailto:apatrick@oracular.com]
Sent: Wednesday, May 10, 2000 9:15 AM
To: thelist@lists.evolt.org
Subject: Re: [thelist] CF Question
> I tried removing the quotes yesterday and got an Oracle improper SQL
> terminator error. Why would the value not be resolved? By putting it in
> quotes Oracle see '#form.reader_id#' as the value so when I remove the
> quotes the DBMS doesn't like #form.reader_id# as a value and the # as a
SQL
> terminator....UGH!
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> : From: Thompson, Amy <AThompson@randomhouse.com>
> :
> : <CFQUERY .....>
> : update reader_table
> : set read_status=1
> : where reader_id='#form.reader_id#'
> : </CFQUERY>
> :
> : This returns an oracle error code of 1722 - invalid
> : number.
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hmmmmm.....Oracle should handle a number comparison whether the number
is in quotes or not.
When you say Oracle is puking on the # sign are you saying that the
string #form.reader_id# is actually making it to Oracle? If that's the
case then something is seriously wrong because ColdFusion should be
translating that into a literal string before sending it to Oracle
(whether it's inside the quotes or not).
Unless your field reader_table.reader_id is a number field and
form.reader_id contains non-numerical data. That would also cause the
error you're getting.
--
Play skillfully with a loud noise.
---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !