Bug report #8800

mssql default attribute values not supported by attribute table

Added by Jaemes Driver over 10 years ago. Updated almost 8 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Data Provider/MSSQL
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17501

Description

It seems that default attribute values (SQL Server table default values) are missing in the QGIS 2.0 attribute table? (they existed in the attribute table as at 1.8)

The default values appear (as expected) in the 'Edit feature form' for a newly created features but not in the 'attribute table view.

For example: when a feature is copied from a shapefile then pasted into the SQL Server table the default values are not utilised.

QGIS version 2.0.1-Dufour
QGIS code revision 34139bc
SQL Server 2008 R2

Here's the odbc error received (the same operation works in QGIS 1.8 -

Provider errors:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'EDIT_USER', table 'CIMS.cimsadmin.LF_DesignPackage'; column does not allow nulls. INSERT fails. [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated. QODBC3: Unable to execute statement

Associated revisions

Revision 174d112d
Added by Jürgen Fischer almost 8 years ago

  • initialize pasted feature with default values (fixes #8800)
  • show default values of new features in attribute table and identify
    results

History

#1 Updated by Paolo Cavallini about 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

#2 Updated by Nathan Woodrow almost 10 years ago

  • Assignee set to Nathan Woodrow
  • Category changed from Digitising to Data Provider/MSSQL

#3 Updated by Jürgen Fischer over 9 years ago

  • Subject changed from QGIS 2.0 / SQL Server - Default attribute values not supported by attribute table? to Default attribute values not supported by attribute table?

#4 Updated by Nyall Dawson about 8 years ago

  • Subject changed from Default attribute values not supported by attribute table? to mssql default attribute values not supported by attribute table

#5 Updated by Jürgen Fischer almost 8 years ago

  • Assignee deleted (Nathan Woodrow)

#6 Updated by Jürgen Fischer almost 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF