ConnexusDave
asked on
What is the fastest way to move a datatable up to a MSSQL Server.
I have created a datatable in memory that is created from various souces.
When I am done I want to load this table into my MSSQL server.
Right now I do it by reading 1 line at a time from the datatable and I do an insert into the MSSQL.
Is there a faster way to load the Datatable to the MSSQL?
When I am done I want to load this table into my MSSQL server.
Right now I do it by reading 1 line at a time from the datatable and I do an insert into the MSSQL.
Is there a faster way to load the Datatable to the MSSQL?
ASKER
Ok, but I need to be able to do this through vb.net so the orginal program has control and can what you said happen.
OK, I gotcha. One way, so long as the table is not super big, is to serialize it to XML, and then pass that XML string to a stored proc with an XML parameter and then use XQuery in the proc to insert into the table.
ASKER
The table contains over 8000 records.
Is there anything like a bulk load or a way I can super load an array that could be "Bulk" pushed/loaded.
Is there anything like a bulk load or a way I can super load an array that could be "Bulk" pushed/loaded.
there is for other sql tables, but not for a VB datatable object.
take a look at this link and let me know if it helps: http://www.sqlservercentral.com/articles/SQL+Server+2008/66554/
take a look at this link and let me know if it helps: http://www.sqlservercentral.com/articles/SQL+Server+2008/66554/
ASKER
Ok I do know to call a stored procedure in vb.net so if I can get some help writing what I need as a stored procedure the points are yours...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
by the way, when you say "in memory datatable"...do you mean a temp table?