1
Answer

error will come in my programme

Santosh Reddy

Santosh Reddy

7y
201
1
private void BtnInsert_Click(object sender, EventArgs e)
{
try
{
SqlConnection con = new SqlConnection("server=.;database=romesh;integrated security=true");
SqlCommand cmd = new SqlCommand("insert into ObjectMethodChecking values('" + TxtFname.Text + "','" + TxtSurname.Text + "','" + Txtaddress.Text + "'," + TxtPhno.Text + ")", con);
cmd.CommandType = CommandType.Text;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
 
error will come below my attachment 

Attachment: Screenshot_(39).zip

Answers (1)