insert record in asp.net simple program with c#
try
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into feesentry_tb (stud_rollno,paidfee,remain_fee)values(8,456,555)",con);
// cmd.CommandType = System.Data.CommandType.Text;
cmd.ExecuteNonQuery();
//DataTable dt = new DataTable();
}
catch(Exception ex)
{
Response.Write(ex);
}
finally
{
con.Close();
}
try
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into feesentry_tb (stud_rollno,paidfee,remain_fee)values(8,456,555)",con);
// cmd.CommandType = System.Data.CommandType.Text;
cmd.ExecuteNonQuery();
//DataTable dt = new DataTable();
}
catch(Exception ex)
{
Response.Write(ex);
}
finally
{
con.Close();
}
0 comments: