AnsweredAssumed Answered

"SQL error or missing database" when adding a feature layer

Question asked by stanios on Jul 12, 2017
Latest reply on Feb 12, 2018 by MBranscomb-esristaff

Hello, I have a problem I'm hoping to get some help with.

 

This is my base map, and this is the layer I want to load as feature layers.

 

There's something special about some of the layers found here, for some reason, a lot of them throw this error when they reach this external call "RuntimeCoreNet.CoreFeatureSourceNativeMethods.CoreFeatureSource_Create(...)" to "RuntimeCoreNETDesktop.dll".

Now this call originates from "Esri.ArcGISRuntime.Controls.ViewBase.AddInitializedLayerToViewAsync(...)" when it tries to "CreateCoreLayerInternal(...)"

 

 

For example here's the error for layer #44

 

18:15:22:8706 EsriMap (Error): 'http://utility.arcgis.com/usrsvcs/servers/5ac4e87c0f1e4a429e258532cc9d98d8/rest/services/USA_Demographics_and_Boundaries_2016/MapServer/44' Layer could not be added to Map because creation of the core layer failed. See InnerException for more information.
Exception:
System.Exception: SQL error or missing database :
at RuntimeCoreNet.Interop.HandleException(Boolean retVal) in C:\Users\******\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\fc\36386527\Interop.cs:line 24
at Esri.ArcGISRuntime.Data.ServiceFeatureTable.CreateFeatureSource(SpatialReference sr_override) in C:\Users\******\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\09\02d92b9d\ServiceFeatureTable.cs:line 641
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Layers.FeatureLayer.<CreateCoreLayerAsync>d__5.MoveNext() in C:\Users\******\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\b7\feb17b6f\FeatureLayer.cs:line 429
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Layers.Layer.<CreateCoreLayerInternal>d__5.MoveNext() in C:\Users\*****\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\13\a04ade1a\Layer.cs:line 412
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Controls.ViewBase.<AddInitializedLayerToViewAsync>d__9.MoveNext() in C:\Users\*****\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\20\8bcb57c8\ViewBase.cs:line 695

 

If I load them as dynamic instead of feature layers, then everything works fine, but if I try to load them as feature layers then I get the error above.

 

I'm not sure what's going on, but other feature layers work just fine - for example: USA Demography, Traffic - with the exact same code, it's only this specific set of layers that seem to be problematic - and slows my application to a halt for a good minute when it's trying to load the map with all those feature layer errors being thrown -.

 

Is there anything special about these layers that might be causing this problem? just wondering how come the same code works fine for many other feature layers, but not these.

Outcomes