Question

Writing to existing SQL Server table

  • 26 June 2015
  • 4 replies
  • 43 views

Hello. I have a workbench that reads an XML and splits it into attributes with their values (with one spatial attribute). I am trying to write this data to an existing, empty SQL Server table. If I set the writer to create a new table, it runs fine, but I can't seem to get it to populate my existing table. The workspace runs, and passes with warnings, but when I go to my SQL Server table it is still empty. Any ideas?

 

 

My writer is configured as follows:

 

Feature operation: Insert

 

Table Handling: Use existing

 

 

The translation log claims that all of my features have been written, and the data inspector shows them fine, but it just won't populate my table.

 

 

Thanks!

 

 

4 replies

the first warning i get is this:

 

 

WARN |MS SQL Server (Spatial) Writer: Could not commit row locally. Provider error 'Description: Unspecified error'. Try turning off 'Bulk Insert'
Userlevel 2
Badge +17
Hi,

 

 

Firstly check whether the every feature follows constraints of the existing table.

 

e.g. "not null", "primary key", "foreign key", "unique", "check".

 

 

Takashi
Userlevel 1
Badge +12

Just had this. The error message didn't provide much detail into what was going on but was able to narrow it down. In my case it was a smallint (not Null) field in SQL that we were trying to pass '' (eg blank) to. @SteveAtSafe

Badge +3

Just had the same issue. Turned out I had a value > 1000 when the field was set as numeric 5.2. Changed it to numeric 7.2, and the error message no longer occurred.

Reply