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

  
    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