Insert function for asp.net
this function can used for delete,insert and update operations
-------------------------------------------------------------------------------------------------
public int insert_function_with _int_returntype(string sav){
int ret;
con.Open();
SqlCommand cmd = new SqlCommand(sav, con);
ret = cmd.ExecuteNonQuery();
con.Close();
return ret;
}
************************************************************************************
public void insert_function(string sav)
{
con.Open();
SqlCommand cmd = new SqlCommand(sav, con);
cmd.ExecuteNonQuery();
con.Close();
}
-----------------------------------------------------------------------------------
No comments:
Post a Comment