I have a query for an MsSql2008FeatureLayer that returns a single point feature. A single point feature doesn't really have a valid bounding box and I get an error if I try to use the GetBoundingBox method for the layer. I have checked and the point location is valid. The error is as follows:
InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.Byte[]'.]
ThinkGeo.MapSuite.Core.MsSql2008FeatureSource.GetBoundingBoxCore() +242
The problem is that the HasBoundingBox method returns true for the layer. How can I test to see if there is a valid bounding box prior to running the GetBoundingBox method?