Some applications have a single set of data. Others may have multiple data sets. For example, accounting applications often allow users to have different sets of data for different companies. Other common uses of multiple data sets are:
archived and current data sets
different data sets by year
training, testing, and production data sets
By "set of data," we mean multiple instances of the same database structure but with different contents. Stonefield Query refers to a set of data as a "data source."
If you want to allow your users to query on different sets of data, set the Allow Multiple Data Sources setting to True. When this setting is True, the Login page displays a drop-down list of data sources defined to Stonefield Query, allowing the user to choose which data source to query on.
How are different data sources defined to Stonefield Query? One of two ways:
If the database's Connection type property is set to User can choose DSN, the user can to select which of the ODBC data sources defined on their system are available to Stonefield Query.
If Connection type is set to Scripted, the GetDataSources method of a data engine plugin should add DataSource objects to the DataSources collection specifying connection settings.
Note that you may want the GetDataSources method of a data engine plugin to add multiple data sources to the collection yet have the Allow Multiple Data Sources setting be false, meaning the user doesn't get to choose which data source they want because the plugin does it for them. That's typically the case when you're hosting Stonefield Query in a multi-tenant environment where users from different customers can log in. Each customer has their own database so you want a user to automatically connect to the database for their company.