OfflineSource Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns or sets a String that represents the data source used when the data access page is offline. Read/write.

expression.OfflineSource

expression   Required. An expression that returns a DataSourceControl object.

Remarks

The value used to set this property varies based upon the current setting of the OfflineType and XMLLocation properties. If the OfflineType property is set to dscOfflineMerge, then this property should be set to a connection string for the local MSDE database. If the OfflineType property is set to dscOfflineXMLDataFile and the XMLLocation property is set to dscXMLDataFile, then this property should be set to a string containing the path to the XML data file.

Example

This example sets the offline settings from the data source control named MSODSC.

  Sub SetOfflineSettings()

   Dim dscConstants

   Set dscConstants = MSODSC.Constants

   ' Set the offline type.
   MSODSC.OfflineType = dscConstants.dscOfflineXMLDataFile

   ' Set the location of the XML data to a data file.
   MSODSC.XMLLocation = dscconstants.dscXMLDataFile

   ' Set the XML data file to use when the page is offline.
   MSODSC.OfflineSource = "Q1 Sales Analysis.xml"

End Sub