08-19-2020 01:35 AM
I'm using GM 2020 update 1 and MS SQL 2014 SP2. I want to upload a an ESRI SHP to this MSSQL using GM.
For this purpose, I've made a Meatadata tables for the DB using Database Utilities; and then GM Output to feature classes. This two operation were made using the SQL SERVER connection (not the SQL SERVER SPATIAL!).
The outcome is a table with no native geometry types but with 1 BINARY field (for the geometry) and 4 FLOAT fields (for the MBR I think...). This table can be read as a spatial layer using GM while by QGIS and M.App Enterprise is only recognised as alpha-numeric table with no geometry.
How can I import ESRI SHP to MSSQL with output table having native geometry fields?
Solved! Go to Solution.
08-19-2020 02:18 AM
I've also tried to create a new point feature using GM. This also resulted with non-native geometry columns whic aren't recognised nor by MAE nor by QGIS.
08-19-2020 03:44 AM
Hi Eran,
"SQL Server Read-Only/Read-Write" is an old DB connector developed far before MS introduced the spatial objects within the SQL server. That's why it does not use the spatial module at all and the geometries are stored as a binary field in proprietary INGR format. The XLO etc. fields are actually helper fields to mimic spatial index.
If you want to use the spatial capabilities of MS SQL server, you need to use the "SQL Server Spatial Read-Write" connector.
Pavel
08-19-2020 04:03 AM
Thank you Pavel Just figured it out myself.
The problem was that I created metadata tables for the SQL SERVER connection type which prevented me of using the SQL SERVER SPATIAL connection type. I needed to delete these undesired tables and only after that, to create metadata tables using the SQL SERVER SPATIAL connection type.