integer field length

Results 1 to 2 of 2

Thread: integer field length

  1. #1
    Joel M Guest

    Default integer field length

    I&#039m trying to INSERT INTO a table that has several different data types...the one in question is an "integer" field.<BR> If the data going into that field is more than...I think 8 or 9 gives me this error:<BR>-----------<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e07&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. <BR><BR>/jdmdesign/add_client.asp, line 43 <BR>-----------<BR><BR>I found this out after writing about another problem with the SQL was solved by Bill...but as soon as that was solved I started getting this error and he suggessted removeing the fields one at a time until I found it...<BR><BR>what do you guys suggesst I do, because it will insert with no issue if the value is no longer than 8 or 9 digits...<BR><BR>thanks<BR>Joel<BR><BR>PS. just in case it helps, the DB was created with MS ACCESS 97...and the data type was set too "integer" on the field in question

  2. #2
    Join Date
    Dec 1969

    Default RE: integer field length

    Integers on almost *ALL* systems are 32 bits long.<BR><BR>Which means that they can contain values in the range of -2147483648 to +2147483647.<BR><BR>If you enter a number outside that range, kablooey.<BR><BR>As a practical matter, that means that any 9 digit number should work but almost all 10 digit numbers won&#039t work.<BR><BR>Type DOUBLE will accomodate more *integral* digits reliably...typically up to 14 or 15, but unless you will really be doing math on these fields, you are probably better off using a text field. Besides, for things like phone numbers, that means you can store "(360) 555-1212" and have it already neatly formatted in the DB!<BR><BR><BR><BR>

Posting Permissions

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