P
Paul
Hi Everyone,
I am have a VS2008 multi-threaded application that process a list of
files by adding each file to a database. The directory names in one
table and file information in another. Since the threads are all doing
the same thing, only one could be he first to add a new directory. The
first add succeeds. Since the directory name is the key, the 2nd add
fails with an SQL exception (Primary Key Violation). I was expecting a
LINQ DuplicateKeyException, but I end up with an SQLException and all
subsequent LINQ operations in the datacontext fail. Any ideas?
Thanks,
Paul
VS2008 using SQL Express
I am have a VS2008 multi-threaded application that process a list of
files by adding each file to a database. The directory names in one
table and file information in another. Since the threads are all doing
the same thing, only one could be he first to add a new directory. The
first add succeeds. Since the directory name is the key, the 2nd add
fails with an SQL exception (Primary Key Violation). I was expecting a
LINQ DuplicateKeyException, but I end up with an SQLException and all
subsequent LINQ operations in the datacontext fail. Any ideas?
Thanks,
Paul
VS2008 using SQL Express