MobileCache mobileCache1 = new MobileCache(@SD-MMC card\My Documents\ArcGIS Mobile\MobileKEPTTest\KEPTS_Mobile); //Get the Mobile Cache MobileServiceConnection mobileServiceConnection1 = new MobileServiceConnection(); // Create connection back to SDE mobileCache1.Close(); mobileServiceConnection1.Url = @"http://servername/ArcGIS/services/Mobile/KEPTS_MOBILE/MapServer/MobileServer"; //SOAP address of service (HAS TO BE IN THIS FORMAT) mobileServiceConnection1.WebClientProtocolType = WebClientProtocolType.BinaryWebService; MobileCacheSyncAgent mobileSync = new MobileCacheSyncAgent(mobileCache1, mobileServiceConnection1); MobileCacheSyncResults mobileResults = new MobileCacheSyncResults(); mobileServiceConnection1.CreateCache(mobileCache1); mobileCache1.Open(); try { label1.Text = "Synchronizing with SDE..."; mobileResults = (MobileCacheSyncResults)mobileSync.Synchronize(); } catch (WebException ex) { MessageBox.Show(ex.Message + " " + ex.StackTrace); } finally { mobileCache1.Close(); label1.Text = "Synchronize Complete..."; button1.Enabled = false; }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.