AdoQueryConnection Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a connection for retrieving data from a Microsoft Access or Microsoft SQL Server database.
public ref class AdoQueryConnection abstract : Microsoft::Office::InfoPath::DataConnection
public abstract class AdoQueryConnection : Microsoft.Office.InfoPath.DataConnection
type AdoQueryConnection = class
inherit DataConnection
Public MustInherit Class AdoQueryConnection
Inherits DataConnection
- Inheritance
Remarks
The AdoQueryConnection class provides properties that can be used to get and set information about the data connection's connection string, SQL command text, and timeout value. It also provides a method for creating a SQL command text fragment based on a specified XML node's attributes.
When a form designer creates a new form template by using the Database template, and then specifies the database to connect to, an AdoQueryConnection object for this connection is added to the DataConnectionCollection collection.
If the form designer also enables submitting to this ADO connection, then an AdoSubmitConnection object for this connection is added to the DataConnectionCollection collection.
For both kinds of connection, the name of each connection is specified by the form designer in the Data Connection Wizard user interface. The default names assigned in the wizard for each kind of connection are "Main connection" (AdoQueryConnection) and "Main connection submit" (AdoSubmitConnection).
Constructors
AdoQueryConnection() |
Properties
Command |
Gets or sets the SQL command string text for an AdoQueryConnection object. |
Connection |
Gets or sets the connection string used for an AdoQueryConnection object. |
Name |
Gets the name of the data connection. (Inherited from DataConnection) |
Timeout |
Gets or sets the timeout value in seconds for a data connection associated with an AdoQueryConnection object. |
Methods
BuildSqlFromXmlNodes(XPathNavigator) |
Returns a SQL command text fragment parsed from the specified XML node that contains query fields values. |
Execute() |
Depending on which ConnectionTypeConnection class it is called from, executes a submit or query operation on the data connection using the declaratively defined values for the submitted data, query parameters, or data to retrieve. (Inherited from DataConnection) |