none
Error while inserting data through OLEDB in C# RRS feed

  • Question

  • Hi all,

     

    I am trying to insert data intio  Excel 2007 through an inset statement. the data inserted into one cells is greated than 256. i am using the following connection string.

     

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\All Testing Trials\SolutionObjects\DimensioninCube\CubeDimension.xlsx;Extended Properties='Excel 12.0;HDR=YES'

     

    But while inserting it is throwing an error ( Oledb Exception)

     

    The field is too small to accept the amount of data you attempted to add.  Try inserting or pasting less data.

     

    Please let me know what is the error. how can this be solved

     

     

    I am really sorry if i had put it in wrong forum. Please suggtest me the right one...

     

    Regards...
    Girija Shankar

     

     

    Wednesday, August 29, 2007 7:01 AM

Answers

  • I believe that this is a limitation of the database provider. AFAIK it isn't possible to insert more than 255 characters into an Excel Worksheet cell.

     

    Wednesday, August 29, 2007 7:39 PM

All replies

  • I believe that this is a limitation of the database provider. AFAIK it isn't possible to insert more than 255 characters into an Excel Worksheet cell.

     

    Wednesday, August 29, 2007 7:39 PM
  • Hello Girija Shankar,

    I got the same error, I don't understand one thing that:

    i'm getting this error only when i'm trying to insert data into .XLSX --> Excel 2007, but insertion is successful when i'm inserting into .XLS with the following connection: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""{0}""; Extended Properties=""Excel 8.0; HDR=YES;"""

    the error I'm getting with:  "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""{0}""; Extended Properties=""Excel 12.0; HDR=YES;"""

    error is: The field is too small to accept the amount of data you attempted to add.  Try inserting or pasting less data.

    could you please suggest me how did you fixed this???

    Many Thanks


    Friday, March 9, 2012 11:38 AM
  • Hi all,

     

    I am trying to insert data intio  Excel 2007 through an inset statement. the data inserted into one cells is greated than 256. i am using the following connection string.

     

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\All Testing Trials\SolutionObjects\DimensioninCube\CubeDimension.xlsx;Extended Properties='Excel 12.0;HDR=YES'

     

    But while inserting it is throwing an error ( Oledb Exception)

     

    The field is too small to accept the amount of data you attempted to add.  Try inserting or pasting less data.

     

    Please let me know what is the error. how can this be solved

     

     

    I am really sorry if i had put it in wrong forum. Please suggtest me the right one...

     

    Regards...
    Girija Shankar

     

     

    Hello Girija Shankar,

    I got the same error, I don't understand one thing that:

    i'm getting this error only when i'm trying to insert data into .XLSX --> Excel 2007, but insertion is successful when i'm inserting into .XLS with the following connection: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""{0}""; Extended Properties=""Excel 8.0; HDR=YES;"""

    the error I'm getting with:  "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""{0}""; Extended Properties=""Excel 12.0; HDR=YES;"""

    error is: The field is too small to accept the amount of data you attempted to add.  Try inserting or pasting less data.

    could you please suggest me how did you fixed this???

    Many Thanks


    Friday, March 9, 2012 12:25 PM