That almost fixed it -- I tweaked the quotes in the VALUE param and now it
works, *thank you!*. If I do VALUE="#trim(x)#", I get the same error. But if
I do VALUE="#trim("x")#", it works.

But wtf? The user_id field is Oracle field type number(6). It looks like
Oracle is misinterpreting #x# as a string (STR?). There can't be any
spaces/nulls in a number(6) field!

So... this works:
<cfloop list="#valuelist(get_user_ids.user_id)#" index=x>
 <cfquery datasource="my_dsn" name="with_cfqp">
 select * from v_user
 where user_id = <CFQUERYPARAM VALUE="#trim("x")#"
CFSQLTYPE="CF_SQL_NUMERIC">
 </cfquery>
</cfloop>


----- Original Message -----
From: "Dave Watts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 4:01 PM
Subject: RE: cfqueryparam error w/ oracle


> > > Next I'd ask an Oracle guy exactly what a ORA-01480 is.
> >
> > From technet.oracle.com:
> > ORA-01480 trailing null missing from STR bind value
> > Cause: A bind variable of type 5 (null-terminated string)
> > does not contain the terminating null in its buffer.
> > Action: Terminate the string with a null character.
>
> Are you sure there's nothing in the variable except the actual value? You
> might wrap the value with Trim:
>
> <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#Trim(myvar)#">
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
>
>
______________________________________________________________________
Get Your Own Dedicated Windows 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=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to