I have a code that can add and update record into database.All the database and code had been done but there is a problem is i need to assign the

row.gen_modifyUser = SYSTEM_USER_LOGIN.UserName;
row.gen_entryUser = SYSTEM_USER_LOGIN.UserName;

in business Logic layer with the code become not null.
Here is my business logic code:

public static bool TMS_GET_PROXIMITY_VALID_TO_USE(string s_proximityNumber)
        {
            bool b_valid = true;
            using (TMPB_attn_DAL dalTMPB_attn = new TMPB_attn_DAL())
            {
               dalTMPB_attn.SetNewCriteria("gen_modifyUser", s_proximityNumber != null);
               dalTMPB_attn.SetNewCriteria("gen_entryUser", s_proximityNumber != null);
               return b_valid;
            }
        }

I had set the gen_modifyUser and gen_entryUser equal to not null but it doesn't work!!!It will pop out the error

object reference not set to an instance of an object

can anyone help me figure out where i had done wrong?

Which object is null?

The debugger is your friend - use it to see.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.