....I'm assuming because it's not always going to be numeric, right?

Correct it could be text or numeric.

....Next question... is the value in this variable being set by a process
....that insures it's a string, or could something like this be happening:

The value comes from a form submission used straight up.

....Also, do you have your cfargument tag's type="" attribute set
....explicity to type="struct" because that may be affecting things.

I do:
<cffunction name="updateData" access="remote" returntype="void">
  <cfargument name="dataStruct" required="yes" type="struct">

I'm guessing it is somekind of driver thing.  Changing the driver from the 
Oracle JDBC thin client driver to the Oracle ODBC driver seems to have resolved 
it.  But I would like to know more about these different drivers.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

....-----Original Message-----
....From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED]
....Sent: Tuesday, April 26, 2005 2:49 PM
....To: CF-Talk
....Subject: Re: Strange data mangling
....
....Hey Ian...
....
....Question... and I think I can guess at the answer but I'd rather know
....your thoughts for sure...
....
....Why are you using ucase() on a numeric value?
....
....I'm assuming because it's not always going to be numeric, right?
....
....Next question... is the value in this variable being set by a process
....that insures it's a string, or could something like this be happening:
....
....<cfset myVar = 000002> <-- note: no quotes. Numerical, not string literal
....<cfset testVar = ucase(myvar)>
....
....It doesn't do anything wrong in a test page, but it might be affecting
....the cfqueryparam tag... so give this a try:
....
....value="#ucase(toString(arguments.dataStruct.Tran_Code))#"
....
....Also, do you have your cfargument tag's type="" attribute set
....explicity to type="struct" because that may be affecting things.
....
....Give'm a try, let us know...
....
....Laterz,
....J
....
....On 4/26/05, Ian Skinner <[EMAIL PROTECTED]> wrote:
....> Can any one see why the following line of code would mangle a value
....such as "000002" into "3L�002"?
....>
....> TRAN_CODE = <cfqueryparam
....value="#ucase(arguments.dataStruct.Tran_Code)#"
....cfsqltype="cf_sql_varchar">,
....>
....> I've tested the value just before this query and at that point it is
....correct and intact.  But once the query runs a seemingly random 3 char
....value is pre-pended to the value that is supposed to be inserted.
....>
....> CF 6.1
....> Oracle 8i
....> Oracle Thin Client
....>
....> If any of those matter.
....>
....> --------------
....> Ian Skinner
....> Web Programmer
....> BloodSource
....> www.BloodSource.org
....> Sacramento, CA
....
....
....--
....---------------
....-------------------------------------
....Buy SQLSurveyor!
....http://www.web-relevant.com/sqlsurveyor
....Never make your developers open Enterprise Manager again.
....
....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204577
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to