John, I'm not talking about using INSERTs from your client. I'm talking
about using an intelligent INSERT statement within the context of a stored
procedure that runs on the server. It inserts rows from a "temporary" table
on the server (which was filled with BulkCopy) to a permanent table. This
permits the server-side business rules, triggers, RI and other logic to run.
--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
"John Bailo" <ja*****@texeme .com> wrote in message
news:XY******** *************** *******@speakea sy.net...
Hmmm...well, there's no reason I can't do that as an intermediate way in
my code.
Do I have to create the temporary table on the same command that I run my
INSERTS on?
Or can I just create two SqlCommand's and run them on the same
SqlConnection? Will the table remain in memory if I do that?
And then I'll need to do the transfer from the temp table to the table
after that.
William (Bill) Vaughn wrote: Basically, yes. We generally transfer to "temporary" tables in the
database (not to tempdb) and perform intelligent INSERT/UPDATE statements
from there. It's far faster.