Bug report #5283
MS SQL provider doesn't save data or datetime
| Status: | Closed | ||
|---|---|---|---|
| Priority: | High | ||
| Assignee: | |||
| Category: | Data Provider | ||
| Affected QGIS version: | master | Regression?: | No |
| Operating System: | Easy fix?: | No | |
| Pull Request or Patch supplied: | No | Resolution: | |
| Crashes QGIS or corrupts data: | No | Copied to github as #: | 15003 |
Description
When using a table with a date field, trying to save the record back the feature is removed from the map canvas and this error is reported in the error log
[1444] QODBCResult::exec: Unable to execute statement: "[Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varbinary to date is not allowed. Use the CONVERT function to run this query. [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared." [1444] d:\\src\\qgis\\src\\providers\\mssql\\qgsmssqlprovider.cpp(800) : (QgsMssqlProvider::addFeatures) [Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varbinary to date is not allowed. Use the CONVERT function to run this query. [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. QODBC3: Unable to execute statementSteps to reproduce:
- Create layer in MS SQL with date field
- Open table
- Add feature
- Save feature
Related issues
Associated revisions
MSSQL:Improve handling of datetime types (fixes #5283)
History
#2
Updated by Tamas Szekeres over 13 years ago
- Status changed from Open to Closed
Fixed in changeset 4a9e8ccb862225b73b89297d6467caf9f1bc0789.