Partager via


FileQueryConnection.FileLocation Property

Gets or sets the Uniform Resource Locator (URL) or universal naming convention (UNC) path of the XML file that is associated with the FileQueryConnection object.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride Property FileLocation As String
    Get
    Set
'Usage
Dim instance As FileQueryConnection
Dim value As String

value = instance.FileLocation

instance.FileLocation = value
public abstract string FileLocation { get; set; }

Property Value

Type: System.String
The URL or UNC of the XML file that is associated with the FileQueryConnection object.

Remarks

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.

Examples

In the following example, the FileLocation property of the FileQueryConnection class is used to display the URL or UNC of the XML file associated with the FileQueryConnection object named "File1" in the DataConnectionCollection of the form template.

public void FileLocation_Clicked(object sender, ClickedEventArgs e)
   FileQueryConnection myConnection = this.DataConnections("File1");
   MessageBox.Show(myConnection.FileLocation);
End Sub
Public Sub FileLocation_Clicked(ByVal sender As Object, _
   ByVal e As ClickedEventArgs)
   Dim myConnection As FileQueryConnection = _
      Me.DataConnections("File1")
   MessageBox.Show(myConnection.FileLocation)
End Sub

See Also

Reference

FileQueryConnection Class

FileQueryConnection Members

Microsoft.Office.InfoPath Namespace