• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

data to long for column

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Been working on my application but keep receiving an error message saying data too long for column tried to change data types nothing works out.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This error message usually mean the text you're trying to write to a column is longer than the maximum width of the column. The same error might also mean that a numeric value is bigger than what a numeric column will allow, and some other types (LOBs, for example, might probably produce similar messages, depending on your DB).

Does the error message at least specify the column name? In that case, have a good look on the definition of that column in the database, and inspect the value your're writing to it correctly. In case of text column it can still be troublesome, as some databases measure length of columns in bytes, not characters, and using a multi-byte character set may mean that the value will be too long even if the number of its characters does not exceed the width of the column.

If you're unlucky to use a database which does not include the name of the column in the error message, it's a lot more of work, but generally you'll just inspect every column and value you're trying to insert as described in the previous paragraph.

If you're unable to sort it out yourself, then please post your code, the description of your table, which database are you using and the full text of the error message. Perhaps someone acquainted with the database will be able to offer some specific advice.
 
reply
    Bookmark Topic Watch Topic
  • New Topic