Default settings
The default file contains the following lines:
<SampleManagementGUI>
<Default>
<Server name="your_db_server">
<Database name="Participants">
</Database>
</Server>
</Default>
</SampleManagementGUI>
This allows any UNICOM Intelligence Interviewer - Server Admin user to access the Participants database on your_db_server. “Participants” is the default database for storing sample records. If you want to allow access to the Participants database on any server, replace the server name with an asterisk.
Settings in the Default section apply to any user who belongs to a role that is not specified in the Role section of the file. If there is no Default section, these users cannot access any sample databases on any servers.
To store the participants table in the project database
To store the participants table in the project database, set Database name to %PROJECTDB%. This will be substituted by the name of the project database. For example:
<SampleManagementGUI>
<Default>
<Server name="ProductionSQL">
<Database name="%PROJECTDB%">
</Database>
</Server>
</Default>
</SampleManagementGUI>
To allow all users to access other sample databases
Add a <Database> tag for each one underneath the one for Participants. To give access to other servers, add a new <Server> tag with its own <Database> specification. The following example allows everyone to access all databases on the Red server, but only the Participants database on the Blue server.
<Default>
<Server name="Red">
<Database name="*" >
</Database>
</Server>
<Server name="Blue">
<Database name="Participants" >
</Database>
</Server>
</Default>
If you omit the <Database> tag for a server, all users can access all databases on that server.
To provide users the option of creating new databases and tables
Add the cancreatenewdatabase and cancreatenewtable properties. For example:
<Default>
<Server name="server_name" cancreatenewdatabase="True">
<Database name="database_name" cancreatenewtable="True">
<Table name="table_name">
<Field name="field_name" />
</Table>
</Database>
</Server>
</Default>
To restrict users to accessing only certain tables and/or fields within a database
You can restrict users to accessing only certain tables or fields in a database, although this is something you might be more likely to do at the role level rather than the default level. The general syntax for setting permissions on tables and fields is as follows:
<Default>
<Server name="server_name">
<Database name="database_name">
<Table name="table_name">
<Field name="field_name" />
</Table>
</Database>
</Server>
</Default>
You can allow non-administrator users to create databases, and provide the non-administrator users access to those databases, as follows:
<User UserName="NonAdminUser">
<Server name="DBServerNameNonAdminUserCanAccess">
<Database name = "*" cancreatenewtable="True">
</Database>
</Server>
</User>
See also