importing data from excel to ms-access

Last post 07-03-2009 5:35 AM by v.vivek. 3 replies.

Sort Posts:

  • importing data from excel to ms-access

    07-01-2009, 11:27 AM
    • Member
      point Member
    • sashakt2
    • Member since 07-01-2009, 3:12 PM
    • Posts 7

    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. 

    Plz help!

  • Re: importing data from excel to ms-access

    07-01-2009, 12:42 PM
    Answer
    • Star
      9,142 point Star
    • hans_v
    • Member since 01-29-2007, 4:03 PM
    • Posts 1,583

     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

  • Re: importing data from excel to ms-access

    07-03-2009, 5:29 AM
    • Member
      262 point Member
    • v.vivek
    • Member since 06-25-2009, 6:50 AM
    • Posts 52

    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.


    Thanks..
    Vivek Vishal

    Please Mark As Answer If This Post Help You To Find Your Solution.
  • Re: importing data from excel to ms-access

    07-03-2009, 5:35 AM
    • Member
      262 point Member
    • v.vivek
    • Member since 06-25-2009, 6:50 AM
    • Posts 52

    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

    Thanks..
    Vivek Vishal

    Please Mark As Answer If This Post Help You To Find Your Solution.
Page 1 of 1 (4 items)