bclubb wrote:
Well if you have a uniqueconstraint defined for Company Name, First Name, and Last Name then I'm not sure how you could insert a duplicate. I would essentially do what you are doing though assuming that you could have records with duplicate company name, first name, and last name. I would use adapter.FetchCollection() and pass a filter with the smilarities that you are looking for then display these to the user.
If you want to check for null try something like this
bucket.PredicateExpression.Add((OrderFields.OrderDate==System.DBNull.Value));
The constraint isn't there, I'm just not sure how to pass in a predicate expression to see if a record with those attributes (first, last, company) exist.
I would like to do this with a collection (you'll notice i've got one commented out in my original post), however FetchEntityCollection takes a relationobject not a IPredicateExpression. If I can do this on a collection, that's the way I want to do it.
Also when I refered to checking for null, I was refering to the entity object. Since the adapter will fill fields with exceptions I can't say
if(_myEntity != null)
{}
A collection solves the problem since I can get a count.
TIA,
Justin