Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Read data from sql database using datetime picker

$
0
0
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
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 ""'

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>