hi,
im trying to write to a sql server database using the following code
DataRow objRow = objDataSet.Tables["tblMember"].Rows.Find(Session["MemberID"]);
objRow["Name"] = lblMemberName.Text;
objRow["Password"] = txtPassword.Text;
objRow["Address1"] = txtAddress1.Text;
objRow["Address2"] = txtAddress2.Text;
objRow["Address3"] = txtAddress3.Text;
objRow["Telephone"] = txtTelephone.Text;
objRow["Mobile"] = Int32.Parse(txtMobile.Text);
objRow["ConfirmSMS"] = ddlConfirmSMS.Text;
objRow["MembershipType"] = ddlGender.Text;
however i get an error at the txtmobile saying that the input string is in the wrong format. i am storing it in a field with a data type of numeric(18,0).i dont want to change the data type as i need to use it in the format it is stored in.
Any suggestions would be great
im trying to write to a sql server database using the following code
DataRow objRow = objDataSet.Tables["tblMember"].Rows.Find(Session["MemberID"]);
objRow["Name"] = lblMemberName.Text;
objRow["Password"] = txtPassword.Text;
objRow["Address1"] = txtAddress1.Text;
objRow["Address2"] = txtAddress2.Text;
objRow["Address3"] = txtAddress3.Text;
objRow["Telephone"] = txtTelephone.Text;
objRow["Mobile"] = Int32.Parse(txtMobile.Text);
objRow["ConfirmSMS"] = ddlConfirmSMS.Text;
objRow["MembershipType"] = ddlGender.Text;
however i get an error at the txtmobile saying that the input string is in the wrong format. i am storing it in a field with a data type of numeric(18,0).i dont want to change the data type as i need to use it in the format it is stored in.
Any suggestions would be great