Field Type - Small Int

Results 1 to 2 of 2

Thread: Field Type - Small Int

  1. #1
    Join Date
    Dec 1969

    Default Field Type - Small Int

    I have a field called Site Code. The field is of type "small int". The field takes in int value from the user of size 4. So if the user enter "5555" it is saved in this column. But if the user enters "0001" then on "1" is saved and "0410" the database hold the value of "410". So basically it truncates out the preceding "0". This zeros are significant in the field value. How should I set the field so that the exact input from the user is saved to the database.

  2. #2
    Mr Swifty Guest

    Default RE: Field Type - Small Int

    "0001" and "0410" are not really integers, which is why they are truncated. You need to use a text field (varchar or whatever it is) to hold these strings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts