You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a statement on the form INSERT INTO table(date) VALUES(?) where date is of type datetime2 in my MSSQL table. When trying to bind to it with a std::string representing the date and time (e.g. like "2019-04-23 22:07:15.000000") I get the following error:
Operand type clash: text is incompatible with datetime2
Is this expected? I have no trouble binding a string to a datetime in mysql, it seems there is something special with datetime2. I can work around by passing the query to the session and encapsulating the datetime string with single quotes, but I would like to use a (prepared) statement since I'm doing this many times in a loop.
The text was updated successfully, but these errors were encountered:
I create a statement on the form
INSERT INTO table(date) VALUES(?)
wheredate
is of typedatetime2
in my MSSQL table. When trying to bind to it with a std::string representing the date and time (e.g. like "2019-04-23 22:07:15.000000") I get the following error:Is this expected? I have no trouble binding a string to a
datetime
in mysql, it seems there is something special withdatetime2
. I can work around by passing the query to the session and encapsulating the datetime string with single quotes, but I would like to use a (prepared) statement since I'm doing this many times in a loop.The text was updated successfully, but these errors were encountered: