ODBC date/time format strings#721
Conversation
Instead of duplicate instances of hardcoding. Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
- Test MSDATETIME2 full precision display. - Test customized format strings. - Check display size is not exceeded. - Exit cleanly on test failure. Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
This will be used by the date/time format length computation Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
fca5c88 to
8c0257b
Compare
|
Repushed - Linux build has a script that checks connection string parameter names are in alphabetical order in |
Signed-off-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>
|
In TDS 7.2 and older, date/time/datetime2 do not exist as wire formats (NVARCHAR is used instead), but Updated o_date test to check TDS version before testing those formats. A problem is that in TDS 7.2 and older, SQL_DESC_LENGTH would be incorrect for |
Allow specifying the format string for ODBC implicit datetime-to-char conversions. Fixes #715. The use case is for people migrating to TDSODBC from other database clients with different date/time formatting.
Configuration Examples :
SQLSetConnectAttr(hdbc, SQL_COPT_TDSODBC_DATETIME_FORMAT, "%Y%m%d%H%M%S", SQL_NTS);DRIVER=FreeTDS;......;DATETIMEFMT={%Y%m%d%H%M%S}Not urgent to review and merge this, so long as you're happy with the form of the above configuration methods.
The changes:
odbc_tds2sql().No matching attribute has been added for ODBC DSNs or for freetds.conf. Does not affect conversion of char to datetime.