[thelist] Netscape Only error using CF and Oracle *

Seth Bienek seth at sethbienek.com
Mon Nov 20 14:53:31 CST 2000


Hi Katie,

What is the scope of the #ID# variable?  Could it be defined in more than
one scope in different parts of the template/app?  I'm thinking that NN and
IE may handle empty values differently somewhere (cookies? who nose..), and
while IE is passing 0, NN is passing an empty value..?  That would make your
(resulting) SQL look like:

 UPDATE  IMAR_PROJ
 SET  	PROJ_NAME ='foo',
 		DESCRIPTION ='bar'
 WHERE   PROJ_ID =

Which is what comes to mind when I see a "unexpected end of SQL command"
error.

This is somewhat of a shot in the dark, but without seeing your resulting
SQL as provided by CF, it's the best I can do.. :)

<tip type="ColdFusion" Title="Forcing number values in CF">
If you're using a number supplied by a user (or another unreliable source)
within a cf-query, you can force the variable to be read as a number by
using the Val() function.

If a valid number is not entered, the variable will be returned as 0.

<cfquery name="foo" datasource="bar">
SELECT blah
FROM boo
WHERE UserID = #Val(Form.UserID)#
</cfquery>

</tip>
Best Regards,

Seth

------------------------------
Seth Bienek
Solutions Development Manager
Stonebridge Technologies, Inc.
972.455.7294 tel
972.404.9754 fax
------------------------------

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Howell, Katie
> Sent: Monday, November 20, 2000 12:52 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] Netscape Only error using CF and Oracle *
>
>
> I have a coldfusion application with an Oracle 8 backend.  On a
> certain page
> if using netscape I get this error:
>
> Diagnostics:
> Oracle Error Code = 921
> ORA-00921: unexpected end of SQL command
>
> The error occurred while processing an element with a general
> identifier of
> (CFQUERY), occupying document position (15:1) to (15:44).
>
> Runs fine in IE, and everyone has looked at my SQL and can't find the
> "unexpected end".
> Here's the SQL
>
> <cfquery name="Update" datasource="webuser">
> UPDATE  IMAR_PROJ
> SET  	PROJ_NAME ='#PROJ_NAME#',
> 		DESCRIPTION ='#DESCRIPTION#'
> WHERE   PROJ_ID = #ID#
> </cfquery>
>
> Have anyone ever run into this?
>
> Thanks,
>
> Katie
>
> ---------------------------------------
> 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