Opened 15 years ago

Closed 15 years ago

#499 closed defect (fixed)

ODBC: Support non-double SQL Server columns

Reported by: brentrobinson Owned by: brentrobinson
Priority: major Milestone: 3.5.0
Component: ODBC Provider Version: 3.5.0
Severity: 2 Keywords: ODBC SQL Server insert geometry decimal
Cc: External ID:

Description

Steps to reproduce:

  • In SQL Server, create a table with a primary key column
  • Add columns X and Y defined as decimal(16,6)
  • Connect to the database containing the table, via the ODBC Provider
  • Using the FdoIInsert command, create a new feature with X and Y oordinates with more than 6 digits precision, e.g. ( 10.12345678, 11.12345678 )

When executing the insert command, an exception with the following message will be thrown:

String data, right truncation

Change History (2)

comment:1 by brentrobinson, 15 years ago

Status: newassigned

comment:2 by brentrobinson, 15 years ago

Resolution: fixed
Status: assignedclosed

Revision: 4530 Author: brentrobinson Date: 7:35:05 PM, Monday, April 06, 2009 Message: Ticket#499:

Modified the PVC Insert and Update handlers to round geometry ordinates to the precision specified by their corresponding RDBMS columns. SQL Server gives an error if too much precision is supplied.

The rounding was implemented for all numeric types, including integral ones, though these would be used much less frequently for geometry values than floating point types.

The ODBC Column type mapper was mapping the SQL float column type to FDO Single data type. However, these columns can store double precision numbers so the mapping was changed to FDO Double. This prevents this submission from rounding ordinate values for SQL float columns to single precision.


Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Fdo.vcproj Added : /trunk/Providers/GenericRdbms/Src/Fdo/Pvc/FdoRdbmsPvcHandler.cpp Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Pvc/FdoRdbmsPvcHandler.h Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Pvc/FdoRdbmsPvcInsertHandler.cpp Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Pvc/FdoRdbmsPvcUpdateHandler.cpp Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Pvc/Makefile.am Modified : /trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/ColTypeMapper.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/MSTest.mdb Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcBaseSetup.h Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcDescribeSchemaTest.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoUpdateTest.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoUpdateTest.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/Column.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnBLOB.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnBool.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnByte.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnChar.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnDate.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnDecimal.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnDouble.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnGeom.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnInt16.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnInt32.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnInt64.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnSingle.h Modified : /trunk/Utilities/SchemaMgr/Inc/Sm/Ph/ColumnUnknown.h

Note: See TracTickets for help on using tickets.