Select to view content in your preferred language

Exception from HRESULT: 0x80041538

20415
22
08-22-2018 01:15 PM
AlvinChin1
New Contributor

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.

Tags (1)
0 Kudos
22 Replies
Weltstaat
New Contributor

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.

0 Kudos
geolio
by
New Contributor

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.

 

 

 

0 Kudos
geolio
by
New Contributor

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))

0 Kudos