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

Save as shapefile fails on PostGIS layer with joined MSSQL Table #20936

Closed
qgib opened this issue May 28, 2015 · 3 comments
Closed

Save as shapefile fails on PostGIS layer with joined MSSQL Table #20936

qgib opened this issue May 28, 2015 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented May 28, 2015

Author Name: Olivier Monod (Olivier Monod)
Original Redmine Issue: 12841
Affected QGIS version: master


When exporting a PostGIS layer with a joined MSSQL table, the exports fails due to an invalid type issue on uint on QGIS 2.8.1, 2.8.2 and 2.9.0-master


Related issue(s): #19316 (relates)
Redmine related issue(s): 10970


@qgib
Copy link
Contributor Author

qgib commented May 28, 2015

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


Please provide more information about the involved tables and how they are joined and possibly the verbatim error message you get.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 1, 2015

Author Name: Olivier Monod (Olivier Monod)


Join is done on integer field on postgres' side (target layer) and on numeric(10,0) field type on MSSQL's side (joined table).

The verbose error message (french, sorry):

Type invalide pour le champ Divisions_DIV_HORS_INVENTAIRE[23]: réception de uint avec le type 0
Type invalide pour le champ Divisions_DIV_HORS_INVENTAIRE[23]: réception de uint avec le type 1

Looking into the joined layer's structure, the field @Divisions_DIV_HORS_INVENTAIRE[23]@ is of type "(bit,null)":https://msdn.microsoft.com/en-us/library/ms177603.aspx which is used as a boolean.

So, it looks like the shapefile export procedure fails to convert the bit value into FTLogical which is the "xBase logical":http://shapelib.maptools.org/dbf_api.html field type.

Hope it helps!

@qgib
Copy link
Contributor Author

qgib commented Jun 11, 2015

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


Fixed in changeset "8d0c28117641c6d9826bf31ce614994ffdb00287".


  • status_id was changed from Feedback to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label 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!
Projects
None yet
Development

No branches or pull requests

1 participant