Bug report #12841

Save as shapefile fails on PostGIS layer with joined MSSQL Table

Added by Olivier Monod almost 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20936

Description

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 issues

Related to QGIS Application - Bug report #10970: MS SQL server: error with tinyint fields Closed 2014-07-29

Associated revisions

Revision 8d0c2811
Added by Jürgen Fischer almost 10 years ago

vector file writer: support QVariant::UInt, ::ULongLong and ::Time (fixes #12841)

Revision 10fbfcf1
Added by Jürgen Fischer almost 10 years ago

vector file writer: support QVariant::UInt, ::ULongLong and ::Time (fixes #12841)

(cherry picked from commit 8d0c28117641c6d9826bf31ce614994ffdb00287)

History

#1 Updated by Jürgen Fischer almost 10 years ago

  • Status changed from Open to Feedback

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

#2 Updated by Olivier Monod almost 10 years ago

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) 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 field type.

Hope it helps!

#3 Updated by Jürgen Fischer almost 10 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF