Link to home
Create AccountLog in
Avatar of theideabulb
theideabulbFlag for United States of America

asked on

SerializeJSON turning 08690 into 8690.. Help!

I am using jquery autosuggest and it uses JSON to give the zipcodes as i type.   The zipcodes are right in the database

as 00620, 08690, etc,etc.  But the JSON is dropping the leading zeros.   How can I make it stay as a full string and not make it a number?
ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Not sure about the jquery part, but in your SQL you can left pad with zeros...

WHERE ZIPCODE = #right('00000' & form.zipcode,5)#
Avatar of theideabulb

ASKER

Crazy, but this fixed it.