Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » Connecting to an UltraLite Database » Opening UltraLite connections with connection strings

Opening UltraLite connections with connection strings Next Page

Supplying UltraLite connection parameters


How connection information is collected depends on how systematic or automated you require the input to be. The more systematic the input, the more reliable the connection information is.

Connection details can be collected via different methods, depending on whether or not you are connecting from a custom UltraLite application, or any of the SQL Anywhere administration tools for UltraLite (that is, Interactive SQL, UltraLite command line utilities, and UltraLite wizards in Sybase Central).

MethodAdministration tools Custom applications

Prompt the end user at connection time: when you require a user to authenticate as one of the four supported database users. The UltraLite graphical administration tools use a connection object.

Where possible, use either the ULConnectionParms or ConnectionParms object. It provides easier checking and a more systematic interface than using a connection string that is an argument for the Open method. See:

XX

Use a connection string:if user authentication is not required because the deployment is to a single-user device, or it is too awkward to prompt a user each time they start the application. The UltraLite command line utilities typically use a connection string if a connection to a database is required. You can also program your UltraLite application to read the values from a stored file, or hard code it into your application. See:

X1X3

Use the ULSQLCONNECT environment variable:if you want to store connection parameters you use repeatedly, so you don't need to repeatedly provide them while your UltraLite database is under development on the desktop. Values you supply as a parameter in ULSQLCONNECT become defaults for the UltraLite desktop tools.

All UltraLite desktop administration tools check the ULSQLCONNECT values for any missing parameters not supplied in a connection string, following parameter precedence rules. To override these values, simply supply the alternate value in the connection string. See Storing UltraLite parameters with the ULSQLCONNECT environment variable.

X2N/A

1 Typically user-supplied.

2 For desktop administration tools only.

3 Typically hard-coded or stored in a file.

See also