1
Answer

pass time and date to stored procedure

vasanth krishna

vasanth krishna

11y
1.2k
1

private void in_Time_Click(object sender, EventArgs e)
        {
            sqlCon_fn();
            sqlcmd = new SqlCommand("Emp_att_out");
            sqlcmd.Connection = sqlCon;
            sqlCon.Open();
            DateTime T = DateTime.Now;
            sqlcmd.Parameters.AddWithValue("@out_time", SqlDbType.DateTime);
            sqlcmd.ExecuteNonQuery();
            sqlCon.Close();

        }

i want to pass the time to strored procedure(Emp_att_out) ....This is my code ..bt i got error    Procedure or function 'Emp_att_out' expects parameter '@out_time', which was not supplied. 

Answers (1)