vasanth krishna

vasanth krishna

  • NA
  • 44
  • 56.4k

pass time and date to stored procedure

Oct 25 2013 2:42 AM

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)