Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSSQL datetime field type error with memorylayer #22351

Closed
qgib opened this issue Feb 24, 2016 · 4 comments
Closed

MSSQL datetime field type error with memorylayer #22351

qgib opened this issue Feb 24, 2016 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority

Comments

@qgib
Copy link
Contributor

qgib commented Feb 24, 2016

Author Name: Nikolaus Batlogg (Nikolaus Batlogg)
Original Redmine Issue: 14368
Affected QGIS version: 2.8.4
Redmine category:unknown


Mssql Server fields of datetime type cannot be added to a memory layer. If QGSFIELD is a List (with members of Type QgsField), derived from a Mssql Server Table layer connected to QGIS,
the method

aMemoryLayer.QgsVectorDataProvider.addAttributes(QGSFIELD)

fails.

This is for both, tables that are connected using the MSSQL driver and tables that are connected over ODBC. However, the same procedure is successful, if the destination layer aMemoryLayer is a file based Shapefile. So it seems, that only Memory Layer Storage Types are affected by this bug.
The MSSQL Server Version is 2012.

@qgib
Copy link
Contributor Author

qgib commented Feb 24, 2016

Author Name: Nyall Dawson (@nyalldawson)


Fairly certain this is fixed in 2.13. Can you please download a nightly release and test?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 24, 2016

Author Name: Nikolaus Batlogg (Nikolaus Batlogg)


Thanks for the prompt reply! Test successful - MSSQL Server datetime fields can be added to a memory layer without any problem. Tested Version: QGIS 2.13 Codeversion fab8dc2
Will there be a similar Fix for the current Long Term Release (2.8.X) too?

@qgib
Copy link
Contributor Author

qgib commented Feb 25, 2016

Author Name: Nyall Dawson (@nyalldawson)


The fix is quite intrusive and not suitable for backporting unfortunately.


  • resolution was changed from to invalid
  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Sep 22, 2017

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Unknown

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority
Projects
None yet
Development

No branches or pull requests

1 participant