Unable to open database

2081
10
Jump to solution
11-04-2020 09:26 AM
MartinStamenkovski
New Contributor II

Hello,

I’m having issue with AGSServiceFeatureTable queryFeatures function, when I call it I get the error bellow.

 

I’m running a simple query like this:

class ViewController: UIViewController { 

 

  private var featureTable: AGSServiceFeatureTable = { 

     let featureTable = AGSServiceFeatureTable(url: url)

      featureTable.requestConfiguration?.timeoutInterval = 30
      return featureTable

  }()

override func viewDidLoad() { 

     super.viewDidLoad()

      self.fetchFeatures()

}


 private func fetchFeatures() { 

     let queryParams = AGSQueryParameters()
     queryParams.whereClause = "1=1"
     self.featureTable.queryFeatures(with: queryParams, queryFeatureFields: .loadAll) { result, error in
              if let result = result {
                     var array: [NSMutableDictionary] = []
                     for object in result.featureEnumerator().allObjects {
                          array.append(object.attributes)
                     }
             }
         } 

   }

}

ArcGIS Runtime Error Occurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error:  Error Domain=com.esri.arcgis.runtime.error Code=1014 "Unable to open the database file" UserInfo={NSLocalizedFailureReason=, NSLocalizedDescription=Unable to open the database file, Additional Message=}

Some help would be great!

 

Thank you

0 Kudos
10 Replies
Nicholas-Furness
Esri Regular Contributor

Great to hear. Thanks for confirming.

0 Kudos