Hi all
I want to create a user-defined method which helps to insert any type of data into the database For example
public DataTable BindGrid(string proc_nme)
{
con.Open();
DataTable dt = new DataTable();
SqlDataReader dr;
cmd = new SqlCommand(proc_nme, con);
dr = cmd.ExecuteReader();
dt.Load(dr);
return dt;
}
This is the method for getting data from the database we have to only pass the procedure name. As the same, I want to create a method for insertion.
Thanks in advance.