Share via


UpdateLink method

Updates a linked data set. If updating the link makes the data mapping invalid, the data set is remapped as a Pushpin Map. Does nothing if the DataSet object has a HowCreated property of geoDataSetDemographic.

Note

If a linked Excel spread sheet is open and the data is changed, a call to the method LinkUpdate will save the changes without a warning.

Applies to

Objects:  DataSet

Syntax

object.UpdateLink

Parameters

Part Description
object Required. An expression that returns a DataSet object.

Example

  [Microsoft Visual Basic 6.0]
Sub UpdateLinksOnMap() Dim objApp As New MapPoint.Application Dim objDataSet As MapPoint.DataSet objApp.Visible = True objApp.UserControl = True 'Open a linked file Set objDataSet = objApp.ActiveMap.DataSets.ShowLinkWizard() 'Allow the user to make changes to file MsgBox "You may now edit the file you just opened (be sure to save changes)." 'Update the linked set with the source file objDataSet.UpdateLink End Sub
[C#]
void UpdateLinksOnMap() { MapPoint.Application objApp = new MapPoint.Application(); MapPoint.DataSet objDataSet; objApp.Visible = true; objApp.UserControl = true; //Open a linked file objDataSet = objApp.ActiveMap.DataSets.ShowLinkWizard(0, "", MapPoint.GeoDelimiter.geoDelimiterDefault,0); //Allow the user to make changes to file - assume System.Windows.Forms.dll is referenced System.Windows.Forms.MessageBox.Show("You may now edit the file you just opened (be sure to save changes)."); //Update the linked set with the source file objDataSet.UpdateLink(); }