Home >Online Product Documentation >Table of Contents >Creating a Database Connection
Before you can execute a collection() function in an XQuery, you need to create a database connection. This is part of the process of making the database tables and views available to your XQuery code.
collection()
This section covers the following topics:
Stylus Studio provides support for the following relational databases:
For specific version support, see http://www.datadirect.com/products/xquery/matrix/ddxquery.htm.
Drivers for most of these databases are bundled with Stylus Studio. For some, like PostgreSQL, for example, you need to specify the classpath for the database driver.
In Stylus Studio, you use the Connection Settings dialog box to specify database connection properties.
Settings vary from database to database, but they typically include the following:
You use the Server URL field to identify the server hosting the database to which you want to connect, the port to use, and any other required or optional parameters. For example, the string used to connect to a Microsoft SQL Server database might look like this:
The specific syntax of the string you enter in the Server URL field varies based on database type. Consult your database documentation for information regarding connectivity syntax and optional parameters.
Stylus Studio populates the Server URL field with a default string appropriate for the database you specify in the Database Type field.
You can edit connection settings for an existing relational database connection.