I'm trying to add data from an Azure SQL table in an Azure SQL database onto the map in ArcGIS Pro but I'm getting an error:
Add data
Exception from HRESULT: 0x80041538
Why is this the case? My Azure SQL table includes location data which is lat and long, both as numbers. I tried using my local Windows machine and also using a Windows VM hosted in Azure where the Azure SQL database resides.
I had a similar problem when importing tables (osm planet dump) from a postgres DB. The solution for me was to add a new ID field with pgadmin, then with the 'create a query layer' tool importing the table by changing the SQL Query from 'select column1, column2, column3, ... from myTable' to 'select * from myTable'. Maybe that helps someone.
I had the same issue!
You have to define a primary key in your database table first. You can add a serial column if needed with
alter table table_name
add column gid serial primary key;
After that refresh your database connection in arcgis pro and it will work.
If it still not working, there may be some problem with your geometry. For example if you have multilinestring and linestring in the same geom column.
I don't know about Azure but in PostgreSQL i fix it with
UPDATE table_name SET geom = ST_RemoveRepeatedPoints(ST_SnapToGrid(geom, 0.001))