I have an integer field that is a foreign key for another table. When I get a new dataset, I want to see if that field is not null and, if not, display the description from the foreign table. I tried using:
if (!mmType.IsEmpty(pe.parish)) but when the field is null, I get an error "Object Reference is not set to an instance of an object" and when I put pe.parish in the watch window, it says "pe.parish threw an exception of type System.NullReferenceException. It is a nullable field and the business entity object identifies it as such. I assume I need to test for the value being null first but when I check to see if pe.parish == null, it says I can't use that with an integer.
I also tried if (!mmType.Equals(pe.parish, null)) but didn't have any better luck.
Any suggestions?
Thanks.
Linda
Linda Harmes
HiBit Technologies, Inc.