Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Help...AccessDB won't take all my SQL Query

    Hello everyone,

    I was having a problem with Access when sending an INSERT SQL string to the database to add a record. It stated that: "Microsoft JET Database Engine error '80040e57' The field is too small to accept the amount of data you attempted to add. "

    So i went into every field in the DB and upsized it to the max, numbers upgraded from byte to Integer, text to Memo, etc. But still same problem. So I'm thinking it might be that Access or the server has a problem with the size of the SQL string that I send on my INSERT INTO statement.

    Oh, and there's no real error in the statement, 'cause if I copy the value of my SQL string and paste it directly into an Access Query (from within access) there's no error whatsoever.

    Any clues on this, I've been sleepless for days with this. Thanks for any help.

    Jerry.

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Texas
    Posts
    287
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Post the sql with the values you are trying to insert and the structure of the table you are atempting to insert into...

    fv

  • #3
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    this occurs when you try to insert data that is too long for hte field

    for example inserting 300 into a byte datatype field (up to 255) or "hello" into a text field of maximum length 4

    if you need to write a lot of variable length data then use a memo datatype on the field (if you set a maximum length its usually better as variable length fields are not very good, they just take the length of the longest value in them.. memo goes up to 65535 i think [64kB].. however if you set a text field to have a length of 200 and you knew it was only ever going to be 8 characters long, it would fill 192 bytes of whitespace for every record)


  •  

    Posting Permissions

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