0
thank u Sanjeeb...Lemme try it out...:)
0
check this code:
public int SaveEmp(Emp objEmp)
{
using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"))
{
string query = "Emplyentry"; //stored procedure name
using (SqlCommand cmd = new SqlCommand(query , con))
{
cmd.Parameters.AddWithValue("@EmpName", objEmp.EmpName);
cmd.Parameters.AddWithValue("@EmpSal", objEmp.EmpSal);
con.Open();
int a = cmd.ExecuteNonQuery();
con.Close();
return a;
}
}
}
0
Thanx a lot for ur kind reply Sanjeeb,That linkhelped me a lot...
But in dat example, database tables are used... But i need stored procedures usage... kindly help:)