Hi all
I am getting error while inserting value to the database
Please check my below code and tell me what is the problem
Code
Dim cm As New SqlCommand("insert into Transportation_Courier_AddressDiary(Name,Alias,ContactPerson,PerParcel,PaymentTerms,CompanyName,Groups,HouseAddress,Memo,GroupRef,Address,City,State,Pincode,Phone1,Phone2,Mobile,Fax,Email,Website,TIN,VATNo,ServiceTAX,IT) values (NULL,'" & txtAddressDiaryAlias.Text & "','" & txtContactPerson.Text & "',NULL,NULL,'" & txtcname.Text & "','" & cmbGrouping.Text & "','" & txthouseaddress.Text & "','" & txtmemo.Text & "',3,'" & txtAddress.Text & "','" & cmbCity.Text & "','" & cmbState.Text & "','" & txtPincode.Text & "','" & txtPhone1.Text & "','" & txtPhone2.Text & "','" & txtMobile.Text & "','" & txtFax.Text & "','" & txtEmail.Text & "','" & txtWebsite.Text & "','" & txtTIN.Text & "','" & txtVatNo.Text & "','" & txtservicetax.Text & "','" & txtIT.Text & "')", constr)
Error
Object reference not set to an instance of an object.