Bug report #6238
The problem with MSSQL layers with bigint primary key
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Data Provider/MSSQL | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | duplicate |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 15546 |
Description
If the MSSQL layer has a bigint primary key, the attribute table is filled with the words "ERROR" (screenshot attached).
Probably the error is in the file /qgis/src/providers/mssql/qgsmssqlprovider.cpp.
Line 523:
feature.setFeatureId( mQuery.value( col ).toInt() );
but need:
feature.setFeatureId( mQuery.value( col ).toLongLong() );
History
#1 Updated by Alexander Bruy over 12 years ago
- Resolution set to duplicate
- Status changed from Open to Closed
Duplicate #6235