Connection property editor
Use the Connection property editor to connect to a database server.
This property editor contains two pages:
To display this dialog, select the connection property in the Inspector when a Database component is highlighted in the Component Tree.
General page
Use the General page to set options commonly used when accessing a database.
The property values contained on the General page of this dialog are stored in the ConnectionDescriptor object.
Connection URL
Specify the Universal Resource Locator for the database connection. The format consists of the URL type ("JDBC" for JDBC database access), followed by driver-specific information, separated by colons. The driver-specific information is driver/server dependent. Refer to the documentation for your driver for more information on this property. It typically includes the driver name followed by the data source name.
For example, to access a Local InterBase Server sample file that has been configured with a data source name of DataSet Tutorial, the URL is: jdbc:odbc:DataSet Tutorial
Some options on this dialog are unavailable until a connection URL is specified.
Choose URL
Click this button to display the Choose a Connection URL dialog box. This dialog lists the history of URLs that you have most recently connected to.
From the Choose a Connection URL dialog, click the Show Data Sources button to change the source of URLs listed in the dialog to all ODBC Drivers that have been registered in your computer's system registry.
If you installed Borland DataGateway (available with the Client/Server edition of JBuilder as a separate installation), you will see an additional Borland DataGateway section that displays URLs from the following sources:
- Local - Click this button to have JBuilder display the URLs for every Borland Database Engine (BDE) alias you have on your system (BDE aliases are stored in your BDE configuration file). This allows you to connect to local BDE tables such as Paradox and dBASE tables.
- Remote - Enter the machine name of any (server) system running DataGateway that is visible to your client machine. Then click the
button beside this field to display the database URLs that are stored on the specified remote server.
Username
Enter the user name authorized to access the server database.
Password
Enter the password of the specified Username for access to the server database. An asterisk (*) appears for each character that you type in this field.
Driver Class
Specify the driver class to use when connecting to the database. This property is optional if you have already registered the driver class with JDBC. If you haven't, specify it here so that JBuilder registers the driver class with JDBC and loads it in memory before attempting the database connection.
Prompt User Password
Select this if you want a prompt to appear each time the connection to the database is attempted. This option is available after a connection URL has been specified.
Use Extended Properties
Select this if you want the properties defined on the Extended Properties page to be used when connecting to the database. This option allows specification of additional connection properties for those drivers that can use the extra information. Check your driver documentation for information on whether it supports this connection feature.
This property defaults to off, meaning that JBuilder uses only the properties listed on the General page when connecting to a database. This option is available once a connection URL has been specified.
Test Connection
Click this button to test whether the database connection can be opened with the properties specified in this dialog box. The results are displayed in the area beneath the Test Connection button.
This option is available after a connection URL has been specified.
Extended Properties page
Use the Extended Properties page to define additional connection properties that your driver may be able to use. These properties are stored in an instance of a java.util.Properties object and is not required or supported by all drivers. Refer to your driver documentation to see if the Extended Properties page of this dialog is relevant.
Adding or changing the information on this page automatically sets the Use Extended Properties option on the General
page, indicating that JBuilder should use these extended properties when making the database connection. By default, JBuilder does not use extended properties when making a database connection.
This page contains a properties table which displays the extended properties that either you have defined or the driver has specified. There are three columns in the table:
- Property - The name of the property.
- Value - The value of the property. If the driver can provide list of acceptable values for any of these properties, these values are displayed in a choice list beside the applicable property.
- Required ? - Whether a value for this property is required or not.
Each row in the table represents a distinct property.
Add property
Creates an empty row in the table so that you can define a new connection property.
Remove property
Deletes the current property by deleting the entire row of information on that property.
Use driver defaults
Accesses driver information and displays the properties in the properties table.