Parent/Child DataRelation. The Basics.

  In short, a parent – child relation is one where (in database terms) two tables have a one-to-many relationship. One example would be Author and Books, one Author may have written many books, but a Book can only have one Author. This is of course an extreme simplification.   In ADO.Net you can easily…

1

"System.Data.Linq.ChangeConflictException: Row not found or changed" Finding the culprit

When updating a data table in SQL Server using LINQ to SQL and the SubmitChanges() method you may encounter the following exception:   System.Data.Linq.ChangeConflictException: Row not found or changed.    at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)    at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)   The error in itself is not too hard to understand, you are simply trying to update by…

4

Why massive inserts using SubmitChanges lack in performance.

  Bulk inserting using LINQ to SQL, why is it so slow? Well, the short answer is that it is not designed to do bulk inserts.   But out of curiosity, why is it slow?   Well, let us do it by example (my preferred way). First create a table in SQL Server like so…

2

How use Convert in a DataTable select?

How to use Convert() when doing DataTable.Select ?   Sometimes you may need or want to select out a number of rows from a DataTable using the LIKE operator, this is no problem on a column with a string type. But what if you wish to do it on a column with, for example, an…

1

Create a LINQ/WCF/Silverlight application in 10 simple steps.

Ok, today I will show how to create a super simple application that uses some of the new stuff you find in .Net 3.5. Try this and then you can throw cool words like Windows Communication Foundation (WCF), LINQ to SQL and Silverlight around you.   This is not intended to be a deep dive…

1