When you are inserting/updating into your db, you would need this: ccfield = '#form.ccfield#'
rather than ccfield = #form.ccfield# I think if you do the first, 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" <[email protected]> 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. >>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, but hey, this is Will talkin'! > > The db is no problem. I've got that set to varchar. I'm just tryin to > ensure the data is correct before it even GETS to the db - no luck. > > Thanks, > Will > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256730 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

