Using a ExeuteNonQuery to call a stored procedure, it does not want to convert my datetime variable, even if i pass it as datetime or a pure string.
I even tried passing it in the exact format that i can see in the Database - still i get the Error converting data type nvarchar to datetime2.
I’m using windows VB and Database activities 1.7.1
Anyone have any ideas? the format in the SQL database for the specific colum are 2024-07-01 00:00:00.0000000
may be the special characters in the string might be creating issue also…cannot say exactly what it is…try to check on exception details in locals panel if it shows any other info
normally…we send the datetime as string and then cast it in sql and that way never saw an issue
also with datetime format with standard sql formatting also did not see an issue…but based on stored proc or due to upgrades there might be changes as well
so better to go with cast itself and try avoiding any special characters…or to verify create a dummy table and string column and pass date as string and check how it looks
Please also validate with Database 1.9.0. There is a big jump in dependencies between the two versions, and it could be that the issue comes from the driver and was actually fixed by said dependency upgrade.