Closed qgib closed 5 years ago
Author Name: Matthias Kuhn (@m-kuhn)
Author Name: Even Rouault (@rouault)
This is a duplicate of #22548 and #22591.
Author Name: Frank Donnelly (Frank Donnelly)
Sorry for the duplication. The target version for this fix is 2.16 - that means this won't be back-ported to a future point release of 2.14? For many who only adopt the LTS releases, this is a make or break issue.
Author Name: Even Rouault (@rouault)
Backported to 2.14
Author Name: Frank Donnelly (Frank Donnelly) Original Redmine Issue: 14999 Affected QGIS version: 2.14.3 Redmine category:data_provider/spatialite
I'm using QGIS 2.14 Essen on a Windows 7 machine (specifically 2.14.3). If I connect to a Spatialite database, add a layer to my layers panel, and open the attribute table of the layer, QGIS populates all the cell values with the word ERROR. If I sort the table, QGIS populates all the cells with the values of one record.
However:
I've noticed that this only happens when a layer's unique ID is a text value that contains alpha characters. If the layer has an integer ID, or has a text ID where all the characters are numeric, the error doesn't occur. But this shouldn't be happening - all of the layers have a unique rowid integer column that Spatialite/SQLite creates by default, and if the attribute table viewer needs a unique numeric id to function it should look at that rowid column.
Sample database file is attached. Train station layer fails (text id, mix of alpha and numeric). Subway station layer partially fails (text id, ids that are numeric work, alpha and numeric fails). Borough layer works fine (text id, all numeric).
Related issue(s): #22548 (duplicates), #22591 (duplicates) Redmine related issue(s): 14575, 14626