Connecting to a Database |
When you need to read data from a database, BarTender makes it easy to add a database connection and customize its settings. This process begins with the Database Setup wizard. Use the Database Setup wizard to configure connections to databases from which BarTender can then read data when it prints a document.
If you are not connected to a database, click the icon on the main toolbar to start the Database Setup wizard. If you are already connected to a database and need to add another one, click the icon in the Database Setup dialog.
After you start the Database Setup wizard, you can specify the type of database that you want to connect to. When you complete the wizard, you can configure and customize your connection by using the Database Setup dialog.
After you configure a database connection, you can export the configuration settings to an XML file. Then, you can import that configuration file to apply the saved settings to a new database connection. To do this, select Import From File in the Database Setup wizard. For more information, refer to Using Database Connection Configuration Files.
Use this dialog to customize the database connections to optimize how BarTender reads the data. When you customize the connections, you can configure tables and views, create joins and queries, create a custom sort order, and write custom SQL statements. You can also use this dialog to export and import database connection configuration files.
Using Named Database Connections
If any documents share the same databases, and if those databases are configured in the same way, we recommend that you create a named database connection. Named database connections save your connection properties and parameters so that you do not have to re-enter them every time that you use them in a document.
About Table and Database Joins
If you are using more than one table or database in a document, the tables or databases must be joined. A database join (or join) tells BarTender how data in multiple tables or databases is related.
Assigning Aliases to Tables and Database Fields
In the Database Setup dialog, you can assign an alias, or alternate name, to any table or database field. You can use an alias to refer to the original table or database field, even if the document is set up to refer to it by a different name.
Using Database Connection Configuration Files
You can use a database connection configuration file to apply a custom configuration to a new or existing database connection. To do this, you export a configuration from one BarTender document to an XML file that you can then use in another BarTender document.