ADORecordset export to Excel fails RRS feed

  • Question

  • Hi all,


    I have a small application(VS2005, C# and M.Office 2003) wich returns a recorset from a OLE DB provider then exports it to Excel. I use CopyFromRecordset RS to export the recordet to excel.


    CopyFromRecordset returns "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))" if the memo field is bigger than 900 or so characters. The Recordset is populated correctly and fails when trying to export to Excel.

    I tested and done the same using SSRS to export to Excel and it works fine, but I cannot use SSRS in production for now.


    There is another way to accomplish this?



    Monday, December 10, 2007 4:06 PM

All replies

  • I think this might be an undocumented bug. I haven't seen the error but the usual behavior is to truncate at 1024 characters. The only alternative that I am aware of would involved using Excel automation to assign the value to the cell directly.


    Monday, December 10, 2007 5:40 PM