NullReferenceException

  • Thread starter Thread starter DotNetJunkies User
  • Start date Start date
D

DotNetJunkies User

ClockSysDataSet.ContactTypeRow rowContactType = null;
rowContactType.ContactTypeID = (int)this.cBoxContactType.SelectedValue;

ClockSysDataSet.CityRow rowCity = null;
rowCity.ZIP = 71679; // (int)this.txtZIP.Text;

int intSalutationID = (int)this.cBoxSalutation.SelectedValue;

this.clockSysDataSet.Contacts.AddContactsRow(null, 1, "Username", "Password", this.txtFirstName.Text, this.txtSecondName.Text, this.txtSurname.Text, this.txtStreet.Text, null);


Hi folks,

I always get NullRefenceEception at this coe and I don't know how to handle this. Can somebody help me please?
 
Hi,

Did you check each parameter?
Also, did you check that clockSysDataSet isn't null?
 
Back
Top