G
Guest
First off I'll explain why I need something similar to ContinueUpdateOnError
feature that a data adapter has, and why I can't just use a data adapter.
Basically I'm updating a Large amount of data using BCP to copy the data to a
temp table in order to quickly move the mass amount of data from a flat file
to my database. I Then run updates on the temp table I just loaded that
insert AND update the data from the temp table to the production table. The
reason i do this is because my data (unfortunately) contains both inserts and
updates. The most efficient way I've found to do this involves using BCP to
move the data, then running SQL Statements I have generated to process the
updates and inserts from the temp table to the production table in the
database. I'm using something 'similar' to the BCP code from the PDC 05
Demo's ( http://blogs.msdn.com/dataaccess/archive/2006/01/09/510083.aspx )
Well it appears that when using try/catch if I have errors that yes it will
catch the error, however I have no control over it. The entire Update
command will then hault not updating any records. Is there some way to have
the ability to continue on with my SQL statement if it happens to hit a
record that doesn't have a corresponding foreign key or something similar?
Thanks
feature that a data adapter has, and why I can't just use a data adapter.
Basically I'm updating a Large amount of data using BCP to copy the data to a
temp table in order to quickly move the mass amount of data from a flat file
to my database. I Then run updates on the temp table I just loaded that
insert AND update the data from the temp table to the production table. The
reason i do this is because my data (unfortunately) contains both inserts and
updates. The most efficient way I've found to do this involves using BCP to
move the data, then running SQL Statements I have generated to process the
updates and inserts from the temp table to the production table in the
database. I'm using something 'similar' to the BCP code from the PDC 05
Demo's ( http://blogs.msdn.com/dataaccess/archive/2006/01/09/510083.aspx )
Well it appears that when using try/catch if I have errors that yes it will
catch the error, however I have no control over it. The entire Update
command will then hault not updating any records. Is there some way to have
the ability to continue on with my SQL statement if it happens to hit a
record that doesn't have a corresponding foreign key or something similar?
Thanks