Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / February 2007

Tip: Looking for answers? Try searching our database.

BulkCopy or Insert ignoring Primary key

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arnoled - 05 Feb 2007 15:55 GMT
I want to make a bulkcopy (or insertcommand if this can't be
acomplished with bulk copy) to a table. But if there are rows that are
already in the table, just ignore them (don't do the insert on that
row) , so i doesn't raise an exception of Violation of Primary Key.

I don't want to bring the whole table from de the database, that would
be very low performant.

If you know any option to do these directly form .net it would be
great, any suggestion is welcome

thanks
Oliver Sturm - 12 Feb 2007 15:32 GMT
Hello arnoled,

<snip>

I admit your problem is not entirely clear to me. Of course you could
write an algorithm that would insert data in the way you describe, but
that would probably not be very performant. It seems to me you are asking
this question in relation to a particular feature that the database
backend you are using has, but then you don't mention what database that
is or what feature you're talking about. Hm.... otherwise, how do you
arrive at the conclusion that there would be such a feature in the first
place?

So, if there is actually such a feature in your database of choice, and
it's based on SQL, and you have an ADO.NET driver for that database, you
should easily be able to use the feature through the standard DB commands.

Finally, if all that doesn't help you at all, please feel free to post
some more explanation :-)

               Oliver Sturm
Signature

http://www.sturmnet.org/blog


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.