Managing Databases


Stonefield Query uses ODBC to access databases. ODBC, or Open DataBase Connectivity, is a database access technology built into Windows that provides a consistent way of accessing data from different database engines. Using ODBC means Stonefield Query doesn't have to know details such as where the server is located, which database to access, etc.; this information is defined in an ODBC "data source" you or your system administrator sets up.

When you run Stonefield Query the first time, it displays a list of ODBC data sources available on your system in the Setup dialog so you can select which ones to query on and specify the user name and password to access the database. You can also do this by choosing the Manage Databases function from the Tools menu.

Whether you use the Setup dialog or the Manage Databases dialog, the process is the same. You see a list of ODBC data sources defined on your system. To specify that Stonefield Query can access a certain data source, select it in the list and check the Use in Stonefield Query option. Stonefield Query needs the user name and password to access this database (this is the database user name and password, not your application user name and password), so enter those in the text boxes provided (the password is encrypted when it's stored in Stonefield Query's system files, so you don't have to worry about compromising your database password). After entering the password, you are asked if you want to test the connection to the data source; choose Yes to perform this test. You can also click the Test button to perform this test.

To create a new data source or edit an existing one, use the Windows ODBC Data Source Administrator dialog. To bring up this dialog, click the ODBC Admin button. Note that in Windows Vista, you'll be prompted to confirm this action in the User Account control dialog. To refresh the list of data sources after creating a new one, click the Refresh button.