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
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
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,
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
.
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
: 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
, 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
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
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
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
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
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
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
13 matches
Mail list logo