Share via


DataObject.Query Method

InfoPath Developer Reference

Reads data from the data adapter that is associated with the DataObject object and repopulates the DataObject object's associated XML Document Object Model (DOM).

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.Query

expression   An expression that returns a DataObject object.

Return Value
Nothing

Remarks

The Query method can be used to refresh the data contained in the XML DOM that is associated with a DataObject object.

Security Level 2: 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.

Example

In the following example, the Query method of the DataObject object is used to refresh the data contained in the XML DOM associated with the DataObject object:

JScript
  XDocument.DataObjects("CityList").Query();

After you have refreshed the data in the DataObject object, you can call the ForceUpdate method of the View object to synchronize the data contained in the DataObject object and the view:

JScript
  XDocument.View.ForceUpdate();

See Also