Why does CF remove my leading 0's??

2006-10-13 Thread Will Tomlinson
This is driving me nuts! No matter what I do, CF gets rid of a much-needed leading 0 in the last 4 digits of a CC #. The variable looks good before sending it into a CFC, then I dump the arguments, and the leading 0 is gone. I have the argument type set to string. cfargument

RE: Why does CF remove my leading 0's??

2006-10-13 Thread Adkins, Randy
1:39 PM To: CF-Talk Subject: Why does CF remove my leading 0's?? This is driving me nuts! No matter what I do, CF gets rid of a much-needed leading 0 in the last 4 digits of a CC #. The variable looks good before sending it into a CFC, then I dump the arguments, and the leading 0 is gone. I

Re: Why does CF remove my leading 0''s??

2006-10-13 Thread Will Tomlinson
Depending on the data type of the variable / database field, it will. If the field is set top number or integer, all leading 0s will be dropped. The DB field will need to be CHAR or VARCHAR So is the solution to check for the len()? If it's 3, add a 0 back to it? Sounds like a goofy solution,

RE: Why does CF remove my leading 0''s??

2006-10-13 Thread Adkins, Randy
What does your CFC look like, are you declaring the variable properly? Such as: cfargument name=Last4 type=integer required=yes / -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Friday, October 13, 2006 1:51 PM To: CF-Talk Subject: Re: Why does CF remove my

Re: Why does CF remove my leading 0's??

2006-10-13 Thread Teddy Payne
. The DB field will need to be CHAR or VARCHAR -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Friday, October 13, 2006 1:39 PM To: CF-Talk Subject: Why does CF remove my leading 0's?? This is driving me nuts! No matter what I do, CF gets rid of a much-needed

Re: Why does CF remove my leading 0''s??

2006-10-13 Thread Josh Nathanson
: Will Tomlinson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, October 13, 2006 10:50 AM Subject: Re: Why does CF remove my leading 0''s?? Depending on the data type of the variable / database field, it will. If the field is set top number or integer, all leading 0s will be dropped

Re: Why does CF remove my leading 0''s??

2006-10-13 Thread Aaron Rouse
, it should save your 0. If you do the second, CF thinks it's not a string. -- Josh - Original Message - From: Will Tomlinson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, October 13, 2006 10:50 AM Subject: Re: Why does CF remove my leading 0''s?? Depending

Re: Why does CF remove my leading 0''''s??

2006-10-13 Thread Will Tomlinson
Better yet a cfqueryparam should just be used with a type of varchar. On 10/14/06, Josh Nathanson [EMAIL PROTECTED] wrote: Ok, forget about the db for a minute. The problem is further up the creek is what I'm trying to say here. Just do a dump of the arguments and CF has already removed the

Re: Why does CF remove my leading 0''''s??

2006-10-13 Thread Will Tomlinson
What does your CFC look like, are you declaring the variable properly? Such as: cfargument name=Last4 type=integer required=yes / I had it set to an integer, but switched to see if a string would work cfargument name=last4digits type=string Will

RE: Why does CF remove my leading 0''''s??

2006-10-13 Thread Brad Wood
Then show us the code that passes the variable into the CFC. ~Brad I have the argument set to string. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your

Re: Why does CF remove my leading 0''''s??

2006-10-13 Thread Aaron Rouse
Lets see more of your code then, because it is not happening for me in a simple test: cffunction name=test output=true cfargument name=lastdigits type=string / cfoutput#Arguments.lastdigits#/cfoutput /cffunction cfoutputTest = #Test('0234')#br /Test = #Test(0234)#/cfoutput Or with: cffunction

RE: Why does CF remove my leading 0's??

2006-10-13 Thread Dan G. Switzer, II
Will, This is driving me nuts! No matter what I do, CF gets rid of a much-needed leading 0 in the last 4 digits of a CC #. The variable looks good before sending it into a CFC, then I dump the arguments, and the leading 0 is gone. I have the argument type set to string. cfargument

Re: Why does CF remove my leading 0's??

2006-10-13 Thread Aaron Rouse
On 10/13/06, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Will, This is driving me nuts! No matter what I do, CF gets rid of a much-needed leading 0 in the last 4 digits of a CC #. The variable looks good before sending it into a CFC, then I dump the arguments, and the leading 0 is