2.2.10.1 Data Connections

A web drawing can be linked to data in databases and other data sources which can affect various attributes of the web drawing, including its visual appearance. A relationship to such data sources is called a data connection. 

A data connection contains properties that specify how the application connects to and queries the data source, including the type of data provider (for example, OLE DB or ODBC) required to access a data source, the name of the server on which the data source is hosted, security information to access the data source, and a query to execute on the server.

The data connections in a web drawing are specified by the Connections XML part. Each data connection is specified by a DataConnection_Type child element of the DataConnections element in a part.

Data connection information can be specified solely by the DataConnection_Type element or partially by information in an external file. If the FileName attribute of the DataConnection_Type element is empty, a data connection is solely specified by the DataConnection_Type element. If the FileName attribute is not empty, a data connection is specified by the DataConnection_Type element and the information contained in the file found at the path described by the value of the FileName attribute.

The following elements in parts of a web drawing specify supplementary information about the data connection.

  • A DataRecordSet_Type element in the Recordsets XML Part contains a ConnectionID attribute that is equal to the ID attribute of the DataConnection_Type element for the data connection and specifies a recordset that uses this data connection to connect to and query a data source.

Data connections can be established for the types of data sources listed in the ConnectionString attribute of the DataConnection_Type element.