I am having issue with inserting some value from a textbox into SQL database from a windows form application. Basically I have 2 textboxes that are use for Start/End Time. So 6:00 or 14:00 will be the input data. When I try to insert that, I get the following error. Any ideas on what I need to do to these textboxes?
"Conversion failed when converting datetime from character string."
Below is my query:
CMD.COMMANDTEXT = "INSERT INTO EMP_TIME VALUES(" & strID & ", " & _
"'" & txtStart.Text & "', '" & txtEnd.Text & "')"