Dim CatalogServiceProxy As New ESRI.ArcGIS.SOAP.ServiceCatalogProxy CatalogServiceProxy.Url = CatalogServiceURL 'If CatalogServiceProxy.RequiresTokens() = True Then ' Dim ArcToken As New ArcServerToken(CatalogServiceURL, UserID, Password) ' Token = ArcToken.GetToken() 'End If Dim FeatureServiceProxy As New ESRI.ArcGIS.SOAP.FeatureServerProxy 'FeatureServiceProxy.Url = FeatureServiceURL + "token=" + myToken FeatureServiceProxy.Url = FeatureServiceURL Dim inputfields As ESRI.ArcGIS.SOAP.PropertySetProperty() = New ESRI.ArcGIS.SOAP.PropertySetProperty(2) {} ' There are TWO Fields / values Dim pPropertySet As New ESRI.ArcGIS.SOAP.PropertySet Dim pDataObjects As New ESRI.ArcGIS.SOAP.DataObjects Dim pPropertySetPropertyLINCNumber As New ESRI.ArcGIS.SOAP.PropertySetProperty Dim pPropertySetPropertyTrackStatusID As New ESRI.ArcGIS.SOAP.PropertySetProperty pPropertySetPropertyTrackStatusID.Key = adofields.name pPropertySetPropertyTrackStatusID.Value = "Some value" inputfields.SetValue(pPropertySetPropertyTrackStatusID, 0) inputfields.SetValue(pPropertySetPropertyLINCNumber, 1) pPropertySet.PropertyArray = inputfields ******* WHAT TO PUT HERE ******* 'Store the array, ignore the result at this time. Dim Result As ESRI.ArcGIS.SOAP.EditResult() = FeatureServiceProxy.Add(1, pDataObjects, Nothing, True, False)
Solved! Go to Solution.
Dim pDataObjectTable As ESRI.ArcGIS.SOAP.DataObjectTable() pDataObjectTable = FeatureServiceProxy.GetTables(Nothing, True) Dim pTemplateInfo As ESRI.ArcGIS.SOAP.TemplateInfo() pTemplateInfo = pDataObjectTable(0).Templates Dim pDataObject As New ESRI.ArcGIS.SOAP.DataObject pDataObject.Properties = pTemplateInfo(0).Prototype.Properties pDataObject.Properties.PropertyArray(1).Value = "TEST" pDataObject.Properties.PropertyArray(0).Value = 123 Dim dataArray As ESRI.ArcGIS.SOAP.DataObject() = New ESRI.ArcGIS.SOAP.DataObject(0) {} dataArray(0) = pDataObject Dim dObjects As New ESRI.ArcGIS.SOAP.DataObjects() dObjects.DataObjectArray = dataArray Dim Result As ESRI.ArcGIS.SOAP.EditResult() = FeatureServiceProxy.Add(1, dObjects, Nothing, False, False)