if (con.State != ConnectionState.Open) { con.Open(); } cmd = new SqlCommand("SP_NewRecord", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Clear(); //cmd.Parameters.Add("Id", SqlDbType.BigInt).Value = Id; cmd.Parameters.Add("Name", SqlDbType.VarChar).Value = Name; cmd.Parameters.Add("DOB", SqlDbType.DateTime).Value = DOB; cmd.Parameters.Add("Designation", SqlDbType.VarChar).Value = Designation; cmd.Parameters.Add("Mobile", SqlDbType.BigInt).Value = Mobile; cmd.Parameters.Add("MailId", SqlDbType.VarChar).Value = MailId; cmd.Parameters.Add("Salary", SqlDbType.Decimal).Value = Salary; //cmd = new SqlCommand("insert into EmployeeDetails values(5,'RR','1991-04-20','Junior','7897897898','kk@gmail.com',24000)",con); cmd.ExecuteNonQuery(); con.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)