Home All Groups Group Topic Archive Search About

Another vb.net and excel question

Author
28 Mar 2005 4:51 PM
E-Cube
Hello all,

Is there a way to simulate the CopyFromRecordSet method (it accepts DAO or
ADO recordset objects) from the office.excel.dll,  so it can work with
datasets/datatables?

Thank you in Advance
E-cube

Author
28 Mar 2005 7:57 PM
Paul Clement
On Mon, 28 Mar 2005 08:51:09 -0800, E-Cube <EC***@discussions.microsoft.com> wrote:

¤ Hello all,
¤
¤ Is there a way to simulate the CopyFromRecordSet method (it accepts DAO or
¤ ADO recordset objects) from the office.excel.dll,  so it can work with
¤ datasets/datatables?
¤

There is no equivalent. The workaround is a little ugly and involves converting a Dataset to an ADO
Recordset using XML, before using it in CopyFromRecordset.:

How To Convert an ADO.NET DataSet to ADO Recordset in Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316337


Paul
~~~~
Microsoft MVP (Visual Basic)