A connection string is a set of connection parameters that is passed from an application so that a database connection can be defined and established. Some parameters are always required to open a connection while others are used to adjust database features for a single connection.
Connection strings are defined as keyword=value pairs in a semicolon delimited list. The following example illustrates a connection string fragment that specifies a database file name, user ID, and password:
Methods of supplying these parameters to a database can vary depending on whether you are connecting from an UltraLite utility or an UltraLite application.
UltraLite command line utilities typically use a connection string if a connection to a database is required.
UltraLite applications can be developed using an UltraLite API to read connection parameter values from a stored file or in the application code. You can supply fixed connection strings when user authentication is not required, or prompt users to supply parameter values at connection time.
When a connection string has been assembled, it is passed to the UltraLite runtime for processing. The connection to the database is granted when the connection attempt is validated. Connection failures can occur if the database file does not exist, or the authentication was not successful.
UltraLite generates an error when it encounters an unrecognized connection parameter.
Discuss this page in DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|