Joel Gordon wrote:
I have changed my code to always attempt to
DROP the table. Unfortunately when I attempt to write the data table
to a
workbook which has had a successful DROP table done then I get the
exception :
System.InvalidOperationException: Dynamic SQL generation for the
UpdateCommand
is not supported against a SelectCommand that does not return any key
column
information.
See:
PRB: Error Occurs When You Use ADO.NET OLEDbDataAdapter to Modify Excel
Workbook
http://support.microsoft.com/default...b;en-us;316756
Another 'resolution' to the problem us to write the dynamic SQL
yourself e.g. using Jet's INSERT INTO..SELECT syntax, perhaps using an
ODBC connection to the data source. Old technology yes, but then so is
Excel <g.
Jamie.
--