开发者

INSERT problem with ACCESS 2007

I use access 2007 and i have a sql command like below

string sql = "INSERT INTO t_person_info(name,surname,bdate,bplace,branch,lang) VALUES('JOE','ADAMS','12/12/2000','London','ENGNR','ENG')";
conn.Open();
command.CommandText = sql;
command.ExecuteNonQuery();
conn.Close();

But it gives an e开发者_如何学编程rror The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data

So what is the problem,

And how solve it??


Each field has a given length or size. For text fields, it's the number of characters that can be stored. For numeric types, it's the number of bytes that make up the field, which constrains the range of numbers that can be stored in that field.

For example, you are inserting 4 characters in to branch field, yet its length might only be 3. Check your table and the length/size of each field to be sure they are large enough to accomodate the data you want to store.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜