protected void btnEdit_Click(object sender, EventArgs e) { try { SqlConnection mysqlconection = new SqlConnection(myconect); SqlDataAdapter myadp = new SqlDataAdapter(); myadp.UpdateCommand = new SqlCommand("Update [tbl_CustInfo] Set [mydate]=@mydate,[name]=@name,[idnasb]=@idnasb,[iddevice]=@iddevice,[email]=@email,[mobile]=@mobile,[tel]=@tel,[Adress]=@Adress WHERE [codemeli]=" + txtcodemeli.Text, mysqlconection); mydat = dryear.SelectedItem.Value.ToString() + "/" + drmonth.SelectedItem.Value.ToString() + "/" + drday.SelectedItem.Value.ToString(); myadp.UpdateCommand.Parameters.Add("@mydate", SqlDbType.NVarChar, 15).Value = mydat; myadp.UpdateCommand.Parameters.Add("@name", SqlDbType.NVarChar, 100).Value = txtname.Text; myadp.UpdateCommand.Parameters.Add("@idnasb", SqlDbType.Int).Value = dridnasb.SelectedIndex; myadp.UpdateCommand.Parameters.Add("@iddevice", SqlDbType.Int).Value = drdevice.SelectedIndex; myadp.UpdateCommand.Parameters.Add("@email", SqlDbType.NVarChar, 50).Value = txtemail.Text.ToString(); myadp.UpdateCommand.Parameters.Add("@mobile", SqlDbType.NVarChar, 11).Value = txtmobile.Text.ToString(); myadp.UpdateCommand.Parameters.Add("@tel", SqlDbType.NVarChar, 11).Value = txttel.Text.ToString(); myadp.UpdateCommand.Parameters.Add("@adress", SqlDbType.NVarChar, 250).Value = txtAdress.Text; myadp.UpdateCommand.Connection = mysqlconection; mysqlconection.Open(); myadp.UpdateCommand.ExecuteNonQuery(); mysqlconection.Close(); } catch (Exception ex) { errorLabel.Text = ex.Message; errorLabel.Visible = true; } } What I have tried: // when click edit Button i see above error message // can you tell me what is problem
codemeli
int
uint
long
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)