View Full Version : Help...AccessDB won't take all my SQL Query

12-09-2004, 09:01 PM
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.


12-09-2004, 10:00 PM
Post the sql with the values you are trying to insert and the structure of the table you are atempting to insert into...


12-10-2004, 03:58 PM
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)