Select to view content in your preferred language

Exception from HRESULT: 0x80041538

16282
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
ShawnRoberts1
Regular Contributor

Hi Joshua, thanks for the reply. On the SQL end the view is healthy and seems works correctly. Whatever is happening it seems to be happening on the pro side. I can delete the view completely use the "create view" tool in pro and it will either hang up and crash pro or cause the same error. The verbose SQL server logs say the data is provided to pro without a problem. So it seems to be on the pro end.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

My guess is that it has to do with FULL OUTER JOIN.  Although you likely need FULL OUTER JOIN, have you tried other joins with the same columns and condition?

0 Kudos
ShawnRoberts1
Regular Contributor

Thanks for the help Joshua. I had some time to do some testing yesterday. I did try just a left join with the same result (works in SQL Manager fails in pro). I was able to generate another fairly generic error (unable to open table on the attribute table... pretty expected at this point). So I'm getting the feeling that the view is simply just too large for pro to deal with. It's about 70,000 unique parcel geometries. As soon as I take the join out and just do a view of the layer i'm using (CREATE view as select * from table a) as a test it works.  However as soon as I add the join back in it fails in pro again (still works perfectly when opening view right out of SQL Manager)

Maybe I'm just not familiar enough with pro but is there a way to put a monitor between pro (or maybe its built into pro) and its databases to watch traffic, and requests to try to catch whatever is happening. 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I forgot to ask, how exactly are you trying to add the data to Pro?  Are you using Make Query Layer?  If so, what are the exact arguments?

0 Kudos
ShawnRoberts1
Regular Contributor

No problem. I'm trying two different ways.

The first way I am doing this is creating the view directly out of pro using the create view tool. Then when I try to add the view (either dragging the data in or using the add button), the errors occur.

The second way is I create the view in SSMS and then use the register with database tool in pro. Then add it. Both produce the same result. 

I'm doing these a views as this data updated almost daily in our databases, and it needs to be displayed in our portal. I can't just create the in memory join as portal doesn't support that.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Since OBJECTID is commonly an Esri geodatabase system field, I would refrain from having your ID fields named the same thing. I am not saying that is the issue here, but eventually it will cause confusion to have user-fields with the same names as common Esri system fields.

At this point, I would open a case with Esri Support.  There are more things to check, but doing it via forums gets cumbersome at a certain point.

Raphiki
Emerging Contributor

How did you deduced the int -2147216072 from 0x80041538 ? Is it an hexa to decimal conversion?

0 Kudos
FAdair
by
New Contributor

Worked for me after converting excel file format to 'Excel 97-2003'.

0 Kudos
EugeneNamaste
Esri Contributor

I have this problem after extracting table from an Azure SQL Table into a local SQL Express table and trying to read the output table in ArcGIS Pro.  I use Py Pandas to read/write the table and keep the index.  Having 'index' field name in the output looks like only one of the reasons -- I rename index to something else.  I finally I resolve this issue, a long way and still need to research what exactly causing this.  Extracting the same Azure table but writing it to a geodatabase table give me a valid table so then I recreate a blank table using the same schema from the valid geodatabase table minus OBJECTID and its associated properties, then append from Azure SQL table to this table.

0 Kudos
TheodoreF
Frequent Contributor

I've had this error when adding a layer from a PostgreSQL .sde database connection in ArcGIS Pro (dragging the layer/right click adding from the catalog pane). In PostreSQL, if I create a copy of the table making sure it has a unique id field and only ONE geometry field, it adds to the map just fine.

So it seemed that the error was originally happening when trying to add a layer which had 2 geometry columns. Not sure if that is a cause or not however.

0 Kudos