-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to update MS SQL Server tables with geometry #257
Comments
What if you use |
Tested, unfortunately the same. |
Unless you can get a debugger on it and step through, this ticket will probably languish, as I do not have an environment to test against. It's possible if @robe2 can replicate your situation that she could debug it. |
(Actually there is one thing I can do which is verify that update works on a loop-back connection to postgres, but it probably does. What GDAL version do you have, that's another variable that might have changed over time.) |
On Ubuntu where OGR FDW was installed via apt (postgresql-16-ogr-fdw), |
Sorry have my github notifications turned off so just seeing this now. @Davis-Klavins which driver are you using? The ODBC or MSSpatial? From my note I have this:
I do have an old CentOS with ogr_fdw and TDS I can try that is running SQL Server 2016 or 2017 on Linux, can't recall. But as I recall I think I had issues updating using the ODBC driver (could only use the MSSQLSpatial) I think because the ODBC one creates a fake FID that doesn't exist in SQL Server so can't use it as a key. |
I'm thinking this might be ODBC driver specific. I checked my current use of MSSQLSpatial on my CentOS box, and I'm using ODBC Driver 13 for SQL Server that was provided by Microsoft rather than FreeTDS against a SQL Server on the same box running
On my sql server database, I created the table as follows and added a record:
On PostgreSQL side I did this: Syntax of my connection looks like this:
On PostgreSQL, this works just fine for me:
and I confirmed I can see the changed data on both the PostgreSQL side and SQL Server side. |
Read through similar ticket, but can't get to work updating MS SQL Server 2016 tables that have geometry column. Without it, works fine both with FreeTDS driver on Ubuntu 24.04, PostgreSQL 16 and even ODBC Driver 17 for SQL Server on Centos 7, PostgreSQL 12.
On table created in MS SQL Server with
query
in PostgreSQL works fine.
But on table created in MS SQL Server with
query
in PostgreSQL returns error:
The text was updated successfully, but these errors were encountered: