Hi,I need to retrieve the Datetime from Employee details After entering Empno in a 1st text box.
Please help ASAP
This is My Coding for VB.NET
Private Sub View_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
con.Open()
cmd = New SqlCommand("regd_regdetail_Empid", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@Empid", Integer.Parse(Trim(TxtEmpid.Text)))
dr = cmd.ExecuteReader()
If dr.HasRows Then
If dr.Read Then
TxtEmpid.Text = dr.Item(0).ToString()
TxtEmpame.Text = dr.GetString(1)
TxtDOA.Text = dr.GetString(2)
TxtDOR.Text = dr.GetString(3)
TxtEmpno.Text = dr.Item(4).ToString()
TxtAppointmentdate.Text = dr.GetString(5)
End If
End If
con.Close()