troubleshooting Question

DBNull Exceptin: The value for column 'WinAut' in table 'Operator' is DBNull.

Avatar of Adnan
AdnanFlag for Norway asked on
C#.NET Programming
12 Comments1 Solution947 ViewsLast Modified:
hi iam getting this exception when im on line:    chkWinAuthOperator.Checked = drUser.WinAut;....

Can somone se what iam doin wrong here?=
private void SetUserDetails()
        {
            Int32 intUserId = 0;
            if (gridViewUsers.Rows.Count > 0)
            {
                if (gridViewUsers.SelectedRows.Count == 0)
                    intUserId = Convert.ToInt32(gridViewUsers.Rows[0].Cells["Operator_ID"].Value);
                else
                    intUserId = Convert.ToInt32(gridViewUsers.SelectedRows[0].Cells["Operator_ID"].Value);
 
                DsOperatorAccess.OperatorRow drUser = dsOperatorAccess1.Operator.FindByOperator_ID(intUserId);
 
                TmpOperator_Id = intUserId;
 
                txtUserName.Text = drUser.UserName;
                txtFirstName.Text = drUser.FirstName;
                txtLastName.Text = drUser.LastName;
                txtEmail.Text = drUser.Email;
                txtPassword.Text = "";
                chkAdmin.Checked = Convert.ToBoolean(drUser.Admin);
                chkInUse.Checked = Convert.ToBoolean(drUser.InUse);
                chkWinAuthOperator.Checked = drUser.WinAut;    // Getting error HERE
                lstLanguage.SelectedIndex = lstLanguage.FindStringExact(drUser.Language);
                BindOperatorAccess(drUser);
            }
        }
ASKER CERTIFIED SOLUTION
sunithnair

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros