Bug report #15124

MSSQL Float Fields Don't Allow Decimal Entry on Forms

Added by Damien Smith over 8 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Nyall Dawson
Category:Data Provider/MSSQL
Affected QGIS version:2.14.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23065

Description

When editing data in an MSSQL table, the form (and browser) does not allow the user to enter a decimal point when editing "float" fields.

Numeric (decimal) fields are fine.

Associated revisions

Revision 71c50513
Added by Nyall Dawson about 6 years ago

[mssql] Fix incorrect precision detection for double/float fields

Fixes #15124

History

#1 Updated by Andre Jesus over 8 years ago

SQL SERVER 2016 and QGIS 2.14.3

Working fine here

#2 Updated by Damien Smith over 8 years ago

This only occurs with the text edit widget. Tested with Lyon and Master and the problem also exists. The only workaround is to use a "range" widget but then you have to know in advance the number of decimal places required.

Tried changing Locale.

Tested with Windows 7 SP1 x64, SQL 2012, SQL 2014.

#3 Updated by Andre Jesus over 8 years ago

Damien Smith wrote:

This only occurs with the text edit widget.

This behavior happens since 2.8.x. I'm not sure why they made It like that but I think It's to force the user to use the correct decimal separator.

My workaround was:

You have to set It to "Range" / Editable / Min: 0,00 / Max: 9999,0 / Step 0,00

That way you can slide or type directly the value.

And remember to save the style as default so you don't need to do It every time you load the layer

#4 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#5 Updated by Jürgen Fischer about 7 years ago

  • Category set to Unknown

#6 Updated by Nyall Dawson about 6 years ago

  • Description updated (diff)
  • Category changed from Unknown to Data Provider/MSSQL

#7 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to In Progress
  • Assignee set to Nyall Dawson

#8 Updated by Nyall Dawson about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF