G
Guest
Hi,
I have a DataTable that is filled with records that I want to INSERT into a
SQL Table. I get it to work fine, however I'm wondering if there is a better
way.
Currently I do something along the lines of the following
daNorthwind.Update(dsNorthwind2, "Employees")
http://support.microsoft.com/kb/310351/EN-US/
The problem is, this does one INSERT at a time instead of doing something
like the following in a Stored Procedure
INSERT INTO MySqlTable
SELECT * FROM DataTableWithNewRecords
Meaning - is there a way to pass a dataTable or even a DataSet to a stored
procedure as a cursor or something? This would seem to be faster...maybe
it's even the same speed...i don't really know
Anyway, your help would be appreciated if you know of a better way.
Regards,
Mekim
I have a DataTable that is filled with records that I want to INSERT into a
SQL Table. I get it to work fine, however I'm wondering if there is a better
way.
Currently I do something along the lines of the following
daNorthwind.Update(dsNorthwind2, "Employees")
http://support.microsoft.com/kb/310351/EN-US/
The problem is, this does one INSERT at a time instead of doing something
like the following in a Stored Procedure
INSERT INTO MySqlTable
SELECT * FROM DataTableWithNewRecords
Meaning - is there a way to pass a dataTable or even a DataSet to a stored
procedure as a cursor or something? This would seem to be faster...maybe
it's even the same speed...i don't really know
Anyway, your help would be appreciated if you know of a better way.
Regards,
Mekim