Using Vendor-Specific Connections
Vendor-specific Connection elements are designed to make configuring a connection very simple.
As shown in the example above, a Connection.MySQL element has been added to the _Settings definition in an application. Its attributes allow the developer to specify the server name, database name, and access credentials. At runtime, the required connection string will be created behind-the-scenes using this information.
Optional parameter elements, as shown above, can be added beneath the connection element. These provide the flexibility of including additional connection string parameters, if necessary. For example, the optional parameters for the MySQL connection include Compress, Connection Lifetime, Direct, Embedded, Port, Protocol, and Unicode. You can also enable special MySQL connection behavior, like use of User Defined Variables, by creating the parameter Allow_User_Variables and setting it to True.
The other attributes for Connection.MySQL and similar connection elements, are:
(Required) Specifies a unique element ID; referred to by otherelements that use this connection.
|Specifies the amount of time, in seconds, before the request to connect to the datasource is presumed to have failed. For most datasources, the default value is 60 seconds. For MySQL, the default is 30 seconds.
|A fully-formed connection string for the database. If a value is defined here, all other attributes will be ignored and this string will be used to connect to the database. Any child parameter elements will be added to the connection string.
|The port number for the database, if the default number is not being used.
In general, vendor-specific connections are much easier to configure than generic connection and developers should look to them first when creating applications.