John,
You might have to create the table dynamically, but once you do that,
you should be able to create a SqlDataAdapter and pass the table to the
adapter with the InsertCommand set.
You will probably have to call the SetAdded method on each row of the
data table to set the row state to added (in case it was not), so that the
adapter will recognize the state as being changed.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"John" <so*****@microsoft.com> wrote in message
news:OT**************@tk2msftngp13.phx.gbl...
Hi,
I have a datatable object in memory, the datasource is not from SQL
server. I want to save this datatable into SQL server 2000, what is the
best way to do it?
The only way I know is to create table dynamically then loop thru
datatable generate and execute an insert statement per row. Quite tedious.
TIA