Skip to main content
Question

DatabaseUpdater match column


gisbradokla
Enthusiast
Forum|alt.badge.img+16

I have always tried to use the databaseupdater but have always had issues with it.

Why if i have a unique column with GFID values and i want to match that it gives the error.

Microsoft SQL Server Non-Spatial Writer: Failed to write a feature of type `dbo.COGO_23' to the database. Provider error `(-2147217900) The data types text and text are incompatible in the equal to operator.'. SQL Command `UPDATE [dbo].[COGO_23] SET [GFID]=?, BLAHBLAHBLAHWHERE [GFID]=?'

this is a flat mssql table with no geometry.

 

4 replies

danminneyatsaf
Safer
Forum|alt.badge.img+12

Hi @Brad Nesom​ 

If the column you're doing the matching on (GFID) is the data type 'text', then the table update will fail. You need to use char or varchar in this case instead.

 

If you're unable to change your column data type to char/varchar you could use a WHERE Clause in your DatabaseUpdater to cast your GFID to varchar instead.

See the screenshot below for an example:

image 

Hope this helps!

Dan


gisbradokla
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • April 21, 2025

@danminneyatsaf 

I am still having an issue with this. 

My table has the gfid column set to varchar. but i still get this error.

254

2025-4-21 17:17:53 | Microsoft SQL Server Non-Spatial Writer: Failed to write a feature of type `dbo.L_DRIVE_COGO_25' to the database. Provider error `(-2147217871) Query timeout expired'. SQL Command `UPDATE [dbo].[L_DRIVE_COGO_25] SET [GFID]=?, [process_flag]=? WHERE [GFID]=?'

 

 


AliAtSafe
Safer
Forum|alt.badge.img+22
  • Safer
  • April 24, 2025

Hello, ​@gisbradokla.

Sorry you’re still running into issues with this error. Would you be able to try increasing the Command Timeout parameter and see if that helps out? Image for reference:

Best,


gisbradokla
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • April 25, 2025
AliAtSafe wrote:

Hello, ​@gisbradokla.

Sorry you’re still running into issues with this error. Would you be able to try increasing the Command Timeout parameter and see if that helps out? Image for reference:

  

  

Best,

I can try that.

It seems as far as the log shows that it is attempting for hours instead of the 30 seconds specified in the parameter setting.

3154    2025-4-24 20:39:36 | Reading source feature # 2000
3155    2025-4-24 20:40:06 | Microsoft SQL Server Non-Spatial Writer: Failed to write a feature of type `dbo.L_DRIVE_COGO_25' to the database. Provider error `(-2147217871) Query timeout expired'. SQL Command `UPDATE [dbo].[L_DRIVE_COGO_25] SET [GFID]=?, [process_flag]=? WHERE [GFID]=?'
3156    2025-4-25 00:32:52 | ... Last line repeated 449 times ...
3157    2025-4-25 00:32:52 | Reading source feature # 2500
3158    2025-4-25 00:33:22 | Microsoft SQL Server Non-Spatial Writer: Failed to write a feature of type `dbo.L_DRIVE_COGO_25' to the database. Provider error `(-2147217871) Query timeout expired'. SQL Command `UPDATE [dbo].[L_DRIVE_COGO_25] SET [GFID]=?, [process_flag]=? WHERE [GFID]=?'
3159    2025-4-25 04:50:53 | ... Last line repeated 499 times ...
3160    2025-4-25 04:50:53 | Reading source feature # 3000
3161    2025-4-25 04:51:23 | Microsoft SQL Server Non-Spatial Writer: Failed to write a feature of type `dbo.L_DRIVE_COGO_25' to the database. Provider error `(-2147217871) Query timeout expired

 

parameter changed to 3x
​​​
​​

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings