C
|
copper21 author 10/22/2024 |
Just for kicks, I switched back to "time" data type and now the insert is working. However, when I go to edit the record, the time still isn't showing up. time data type -> inserts work, but time does not show when editing the record datetime data type-> insert does not work, but the time does show up when editing the record, but always shows 6:00 pm, regarless of what time is in the db. |
![]() |
Sergey Kornilov admin 10/22/2024 |
In yur code curly braces are miplaced. I'm sure that the closing curly brace is meant to be before the following line: You can also enable SQL debugging to see the actual SQL query printed and troubleshooting it by running it against your database manually. |
C
|
copper21 author 10/22/2024 |
Sergey, Thank you for the reply. The update will occur if the TimeRelease field is not populated, so that is why I put it in the brackets. Just for grins, I put the code outside of the brackets, and it still did not update the field with the data type datetime. The above code works fine with the data type "time", but not the data type "datetime". I have now enabled SQL debugging and will see where that takes me. Brian |
C
|
copper21 author 10/23/2024 |
Solved the issue...although not sure why I had to do this for it to work. I had to cast the field as a varchar in the SQL query. CAST(TimeReleased AS varchar(8)) AS TimeReleased, |