Last post Jul 03, 2009 05:35 AM by v.vivek
Jul 01, 2009 11:27 AM|sashakt2|LINK
I am trying to insert data in 21 columns of ms-excel into ms-access with the help of ADO.NET code. When I insert lesser data in ms-access, its working fine. Problem comes when all data needs to be inserted. An
insert into statement is used as a query.
I am getting the following error:
System.Data.OleDb.OleDbException: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
Jul 01, 2009 12:42 PM|hans_v|LINK
Well, the error explains it all. One (or more) of the fields in the excel file are longer as the maxfieldlength of the corresponding field in the database. The max length of a text field in access is 255. If the excel file contains fields longer than 255,
use the memo type for that field
Jul 03, 2009 05:29 AM|v.vivek|LINK
size of value in one of the excel column is greater than size of corresponding column of ms access. this may be your address feild.
Jul 03, 2009 05:35 AM|v.vivek|LINK
charecter present in one of the column in your excel sheet is more than the size of access column.i thik colums are like address,description etc