A Stonefield Query project consists of several files, some of which must be deployed to the end-user (those in the Project_Data folder) and some of which are created on the end-user's system and shouldn't be deployed (those in the App_Data folder).

Deployed files

  • settings.xml: this is the main project file. It stores the configuration settings and the connection settings for the data dictionary databases used by this project. It also assigns a unique ID to the project. This file goes in the Project_Data subdirectory of the project folder on your system and is deployed to the Project_Data folder on the end-user's system. Here's some of the content of Settings.xml for the sample project that comes with Stonefield Query Studio (some was removed for brevity):

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <ProjectSettings id="d800c38e-3de5-41ef-a579-b858d49f0970">
        <ApplicationName>PMEa+2uqu0d9l+xvzlyywTWDI8yby1SNl2B2WPiThaI=</ApplicationName>
        <ShortApplicationName>PMEa+2uqu0d9l+xvzlyywdPFE0/bagXfhvoEmjerqlg=</ShortApplicationName>
        <SupportMultiLanguages>false</SupportMultiLanguages>
        <SupportEmail>websupport@stonefieldquery.com</SupportEmail>
        <CustomUserSettings />
      </ProjectSettings>
      <connectionStrings>
        <add name="MetaData" connectionString="Data Source=MetaData.dat"
          providerName="System.Data.SQLite" />
      </connectionStrings>
    </configuration>

    Some entries in the file are encrypted.

    A project can use more than one data dictionary database; for example, you may have a project that combines the data dictionaries of two applications, such as an accounting application and a contact management system. Each database is specified with the following attributes in the connectionStrings section of Settings.xml:

    • name: the name of the connection. This is normally the same as the name of the database without any path or extension but can be different, as long as it's unique in the set of connection names.

    • connectionString: the connection string for the database. For SQLite, the connection string is the name of the database file with a path relative to the location of Settings.xml (since they're in the same folder, no path is used in the sample). The connection string may be encrypted, depending on whether you chose that option when you created the project.

    • providerName: the name of the .NET data provider. "System.Data.SQLite" means the database is SQLite, "System.Data.SqlClient" means Microsoft SQL Server, and so on.

    If more than one data dictionary database is used, additional connection strings are specified and the last one listed is the one data dictionary records are written to. This allows you to create a version of Stonefield Query that integrates two applications without overwriting the objects in the data dictionary files for the individual applications. This can also be used when you want data dictionary customization at the end-user site (the customizations are written to the last database) without worrying about those customizations being overwritten when you install an updated data dictionary.

  • Data dictionary database: if you're using SQLite for the data dictionary database, a DAT file contains that database. You specify the name when you create a new project; the default is MetaData.dat. If you convert a project from an older version of Stonefield Query, the name may be something like "repmeta.dat." The name is specified in the connectionString setting of the connectionStrings section in Settings.xml.

    If you're using a different database engine for the data dictionary (defined when you created the project), you'll have to install that database on the end-user's system.

  • resources..xml*: resource files to support multiple languages. See the Multi-Language Support topic for details on these files.

Non-deployed files

  • ApplicationSettings.xml: this file contains settings about the installed copy of Stonefield Query, such as the folders used for report and schedules and connection settings for the formulas, tags, and security databases. This file is automatically created the first time Stonefield Query is run.

  • DataSources.exml and DataSourceRoles.exml: these file contains data source settings. These files only exist if Connection type property of one or more databases is set to User can choose DSN and in that case are automatically created the first time Stonefield Query is run.

  • SQData.dat: by default, Stonefield Query stores various things in a SQLite database which is automatically created the first time Stonefield Query is run. These things are:

  • Formulas created by end-users are stored in a Fields table in a different database than in the data dictionary database. This prevents their formulas from being overwritten when you install an updated data dictionary. The connection settings for the formulas database are specified in the connectionString setting of the "formulas" connection in the connectionStrings section in ApplicationSettings.xml.

  • Tags defined by end-users are stored in a Tags table. The connection settings for the tags database are specified in the connectionString setting of the "tags" connection in the connectionStrings section in ApplicationSettings.xml.

  • Security settings are stored in Users, Roles, UserRoles, and Permissions tables. The connection settings for the security database are specified in the connectionString setting of the "security" connection in the connectionStrings section in ApplicationSettings.xml.

    If you want to use separate databases for these things or you want to use a different database engine such as SQL Server, edit the connection settings in ApplicationSettings.xml as necessary.

  • USERNAMEUserSettings.xml: settings specified by a specific user in the Options dialog are stored in a settings file prefixed with the user's name, such as ADMINUserSettings.xml.