Navigation:  Programming Cookbook > Database Connectivity > Connecting to a Data Source >

Choosing from a list of Data Sources

Previous pageReturn to chapter overviewNext page

It's possible to allow a user to browse a list of available data sources when opening a new DBConnection. To see this, evaluate the following:

DBConnection new open.


You will be prompted with a Select Data Source dialog from which you can choose the appropriate source for the connection.

Of course, you would normally assign the resultant DBConnection to an appropriate variable. We have chosen not to do this here since we already have a connection to use for the rest of this tutorial. For our purposes in this tutorial you can Cancel this dialog.