Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
36836 Points
5443 Posts
Apr 18, 2012 01:28 PM|LINK
you performed a left join, so p can be null, thus any reference to p.??? can fail. your null handling logic is wrong. it shoudl be:
crmstatus = (p == null || p.crmstatus == null) ? "New" : p.crmstatus,
....
bruce (sqlwo...
All-Star
36836 Points
5443 Posts
Re: Object reference not set to an instance of an object
Apr 18, 2012 01:28 PM|LINK
you performed a left join, so p can be null, thus any reference to p.??? can fail. your null handling logic is wrong. it shoudl be:
....