Some applications use different ODBC data sources (DSNs) to switch between different databases. In that case, you can configure Stonefield Query to allow the user to manage their own list of data sources. This tutorial shows an example of that. It assumes you completed the "creating a project" tutorial for either Microsoft Access or SQL Server and that project is open in Stonefield Query Studio.

  • If they don't already exist on your system, use the ODBC Data Source Administrator to create DSNs for the SQL Server Northwind database and the Access Northwind database in the Sample Project folder of the Stonefield Query program directory. Note that Stonefield Query is a 32-bit application, so if you are running on a 64-bit system, be sure to use the 32-bit ODBC Administrator located in the \Windows\SysWoW64 folder.

  • In Stonefield Query Studio, select the Configuration panel and select the Data node.

  • Select the Allow Multiple Data Sources setting and change it to True. Do the same for the User Can Manage Data Sources setting.

  • Click the Launch Stonefield Query button ().

  • Select the Manage Databases function from the Tools menu, select the DSN you created for the SQL Server version of Northwind, turn on the Use this data source checkbox, and enter the proper user name and password. If you are prompted to test the connection, choose Yes; if you aren't prompted, click the Test button. Then select the DSN for the Access version, turn on the Use this data source checkbox, and click the Test button. Click the Close button.

  • Select the report you created in the "creating a project" tutorial and run it.

  • Select Open Database from the File menu, select a different data source from the list, and click the OK button.

  • Run the report again. The results may not look very different because the Access and SQL Server Northwind database have almost identical contents. You can confirm that you are querying on the appropriate database by making some changes in one or the other and then running the report again.