How to read data from database using datetimepicker with Textchange event. I have a datetime picker and a datagridview in my form. I want to get data from Sql databse table with the selected datetimepicker value. I try with this code
But it shows error 'Incorrect Syntax near ""'
Dim editdate As Date editdate = DTPEDITAT.Value Dim strSQL As String = "SELECT EMP_ID,EMP_NAME,AT_STATUS,AT_REMARK FROM ATTENDANCE WHERE AT_DATE = (%" & editdate & "%)ORDER BY EMP_NAME ASC"
But it shows error 'Incorrect Syntax near ""'