Hi All.
I create stored procedure to fill datagridview
Now I modified form insert in menu DateTimePicker field to filter DGV. How to change stored procedure to filter DGV?Code:SELECT Emp_id ,ADate ,Position, FName ,LName
FROM Employee
Thanks.
Printable View
Hi All.
I create stored procedure to fill datagridview
Now I modified form insert in menu DateTimePicker field to filter DGV. How to change stored procedure to filter DGV?Code:SELECT Emp_id ,ADate ,Position, FName ,LName
FROM Employee
Thanks.
You would add a where clause with a parameter to the sproc:Then you'd add a parameter to the Command you're using to execute the sproc:Code:WHERE ADate = @ADate
then you'd set the parameter value from your DTP:vb.net Code:
myCommand.Parameters.Add("@ADate", SqlDbType.DateTime)vb.net Code:
myCommand.Parameters("@ADate").Value = myDateTimePicker.Value.Date