Bug report #10970
MS SQL server: error with tinyint fields
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||not reproducable|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19316|
I loaded a MS SQL (non spatial) table. When attempting to save it as dbf, I always get an error (something like "Variant type not valid for field XXX : uint received with type 0).
Fields throwing errors are of type ``tinyint``.
#1 Updated by João Gaspar over 6 years ago
Hi Paolo, i don't know the level of your urgency but you can use the MMQIS plugin as workaround to export data from non spatial tables of MSSQL in csv format.
I test with a small table non spatial and work.
My OS info: Windows 7 64-bit
QGIS Version: QGIS Chugiak 64-bit (OSGeo4W installer)
UPDATE: I can create .dbf and .csv in export option, but in some tables. Another thing, i'm having problem open some Views, and some tables give me the same error as you report. For the problem itself, i think is the type of the field (is only a hint).
#4 Updated by Filip Mahieu over 5 years ago
I do have the same problem (in Qgis 2.8 32-bit, OS XP, SQL-Server 2008R2, spatial table), indeed with datatype 'tinyint'. Changing the datatype to 'smallint' solved the problem.
Problem did only exist if there was effectively data entered in the field (Null-values do not throw error). Exports to shape also throws the error.