Question

Problem with updating and inserting to MS SQL Spatial JDBC

  • 19 September 2019
  • 4 replies
  • 2 views

Badge

Hello. I have created this workspace before for other datasets without an issue, but for this particular dataset I'm getting the following error when trying to update or insert:

MS SQL Server Spatial (JDBC) Writer: Updating using SQL: UPDATE [lccgis].[DRA_TASWATER_SEWER_LINES] SET [Material] = ?, [Diameter] = ?, [InvertLevelDownSteam] = ?, [InvertLevelUpStream] = ?, [JointType] = ?, [PipeClass] = ?, [SurfaceLevelUpStream] = ?, [SurfaceLevelDownStream] = ?, [Class] = ?, [SHAPE] = ? WHERE [MXASSETNUM] = ?

MS SQL Server Spatial (JDBC) Writer: Error writing feature. Error: <null>

delete works fine.

Any ideas much appreciated.

Lara


4 replies

Badge +16

Hi @lmrector

Is one of the attribute values you are updating/inserting <null>?

Badge

Hi Lara - please submit a defect report at https://www.safe.com/support/report-a-problem/

At a minimum this report should contain

  • a workspace that shows your writer configuration
  • the table schema
  • any constraints on the table
  • the log file for the failed translation

We might end up needing full repro data from you, but we can try without to get started.

Badge

This is an example of the data copied from the FME log. My suspicion is that is is something to do with the shape. I'm going to work on the point data and see if that works ok. If it does then I will investigate the geometry more closely if it doesn't then it's probably an attribute issue.

Feature Type: `lccgis.DRA_TASWATER_SEWER_LINES'

Attribute(encoded: fme-system): `AboveGnd' has value `No'

Attribute(encoded: fme-system): `BeddingMat' has value `Unknown'

Attribute(encoded: fme-system): `CaptMethod' has value `Unknown'

Attribute(encoded: utf-8) : `Class' has value `Gravity Main'

Attribute(encoded: fme-system): `Combined' has value `No'

Attribute(encoded: fme-system): `Comments' has value `Brisbane St, Node 57508 To Node 57507; SL_US=6.13; IL_US=4.81; SL_DS=6.22; IL_DS=4.57'

Attribute(encoded: fme-system): `Diameter' has value `300mm'

Attribute(encoded: fme-system): `EndType' has value `Unknown'

Attribute(encoded: fme-system): `FACILITYID' has value `TTZ06GM20475'

Attribute(encoded: fme-system): `HzAccuracy' has value `Inferred (>300/500mm)'

Attribute(string) : `InvertLevelDownSteam' has value `4.57'

Attribute(string) : `InvertLevelUpStream' has value `4.81'

Attribute(encoded: fme-system): `JointType' has value `Solvent Cement Joint'

Attribute(encoded: fme-system): `MXASSETNUM' has value `A670042'

Attribute(encoded: fme-system): `MXLOCATION' has value `TIBSN'

Attribute(encoded: fme-system): `Material' has value `Unplasticised Polyvinylchloride'

Attribute(string) : `OBJECTID' has value `14532'

Attribute(encoded: fme-system): `OWNEDBY' has value `TasWater'

Attribute(encoded: fme-system): `PipeClass' has value `SN4'

Attribute(string) : `SHAPE_GEOMETRY' has value `shape_arc'

Attribute(encoded: fme-system): `SubtypeCD' has value `Gravity Reticulation Main'

Attribute(string) : `SurfaceLevelDownStream' has value `6.22'

Attribute(string) : `SurfaceLevelUpStream' has value `6.13'

Attribute(encoded: fme-system): `VertAcc' has value `Inferred (>300/500mm)'

Attribute(string) : `_clipped' has value `no'

Attribute(encoded: utf-8) : `fme_db_operation' has value `UPDATE'

Attribute(string) : `fme_feature_type' has value `ssGravityMain'

Attribute(string) : `fme_geometry' has value `fme_line'

Attribute(entangled: string) : `fme_type' has value `fme_line'

entangled to [SHAPE_GEOMETRY]

Attribute(string) : `mssql_type' has value `mssql_linestring'

Attribute(32 bit integer) : `multi_reader_full_id' has value `2'

Attribute(32 bit integer) : `multi_reader_id' has value `2'

Attribute(string) : `multi_reader_keyword' has value `ESRISHAPE_1'

Attribute(string) : `multi_reader_type' has value `ESRISHAPE'

Attribute(string) : `multi_writer_id' has value `0'

Coordinate System: `MGA94-55'

Geometry Type: IFMELine

Number of Coordinates: 2 -- Coordinate Dimension: 2

(511296.72788425535,5412463.218066342)(511264.606885504,5412439.201054014)

Badge

Hi @lmrector

Is one of the attribute values you are updating/inserting <null>?

There are nulls in the date field. I will try to remove all of these and run again.

Reply