This simply means you are using an object that is
null
. Accessing a member on null
is
never valid.
I'm not sure which line is causing
the error. Is it the one that says "Primary Key"? If so, could employees be
null
? It should be extremely trivial to find out using the
debugger.
If needed, check for
null
before using the object to prevent this
error.
No comments:
Post a Comment