Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Insert Large String(10000 Character String) into excel Sheet using Oledb Query
    primarykey
    data
    text
    <p>I created web application, in this application there is a part of insert Large string (String having more than 10000 characters) values in to excel sheet using oledb query. i have tried the below code but i am getting </p> <blockquote> <p>"The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data." this error.</p> </blockquote> <pre><code>string con = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.xls;Extended Properties=Excel 8.0;"; using (OleDbConnection connection = new OleDbConnection(con)) { connection.Open(); // string str = "bsdhjbdshjfbdhjsfsbjfsbfhjsfbjhbfjhbfjhsbhfshjfjfbjhfjshfjhsfjshfjdhsfjsjfdsjfj"; string str = "bsdhjbfdggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggdfgdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddshjfbdhjsfsbjfsbfhjsfbjhbfjhbfjhsbhfshjfjfbjhfjshfjhsfjshfjdhsfjsjfdsjfjjglfgjlkjgoig/dfdfgflkdglkfgfjlkgkjldfglklfggjoitglklkfjdgoidjgldmgldgogloieewrlkrj/k.asuhdidkahdsdhisuahdiuhsikudhiusadhiusdhishdisiduhidhsihahudihiuhisahdiuhiai"; string sqlStquery = "Insert into [Sheet1$] ([ID],[Name]) Values ('" + 0 + "','" + str + "')"; OleDbDataAdapter dbadapter = new OleDbDataAdapter(sqlStquery, connection); dbadapter.SelectCommand.ExecuteNonQuery(); dbadapter.Dispose(); connection.Close(); connection.Dispose(); } </code></pre> <p>so can any one suggest me how to insert more than 10000 character string value into Excel sheet using Oledb Query.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload