Exposing a Database

Previous  Home topic  Next  Print this topic Send Feedback

<database>

 

Available parameters for exposing a database to PerfectForms™ include the following:

 

name - The name you want to expose to PerfectForms™.
id - A unique id. You can choose any ID you like for this but make sure it is unique within the list. This allows you to change the name in the config file which will not disturb the integrity of the system. Note that a warning message will be added to the log files if duplicate datasource IDs are detected.
db - The actual database name on the database server. Note that a warning message will be added to the log files if duplicate databases are detected.
user - The database user name (not exposed to PerfectForms™).
password - The database password (not exposed to PerfectForms™).
login - This specifies which users (as defined within the <logins> section) have access to this datasource. You can see how the third database definition allows three different <logins> to access it. If no login is supplied, then no one will be able to access the database.
table - If this parameter is not included then all tables within the database will be made available. If included, it can include a list of tables separated by commas.

 

 

Restricting Database Query Actions

 
When you define your connections within PerfectForms™, you are instructing PerfectForms™ to talk to a named database connection as exposed within the connection agent. In the Connections Dashboard of PerfectForms™, you can then set up an action that instructs the agent to assemble one of the following query types: SELECT, UPDATE, INSERT or DELETE.

 

By default, access of all types is denied to users defined within the <login> element. Using either of the following attributes within the <database> element will provide access:

 

login - Specifies the IDs of users allowed basic SELECT or lookup type access. You would always expect to find the login statement, as without this there is no access allowed of any type for any user.
delete and insert - Can be either "*" (anyone can DELETE), "deny" (none of the login users in the <database> element are allowed to delete) or "[login name],[login name,..." any of listed login names are able to delete).

 

Assume you have the following <logins> defined:

 

<logins>

       <login id="Freddy" username="perfectforms" password="pf" />

       <login id="Mary" username="username2" password="password2" />

</logins>

 

 

1.Deny DELETE actions for all users.

<database name ="test.csv" id="11"  db="test.csv" delete="false" separator="," login="*"/>

 

2.Allow DELETE action just for login user "Freddy". "Mary" can perform lookups but not delete.

<database name ="test.csv" id="11"  db="test.csv" delete="Freddy" separator="," login="login1,login2"/>

 

3.Allow INSERT action for Freddy and Mary.

<database name ="test.csv" id="11"  db="test.csv" insert="Freddy,Mary" separator=","/>

 

Updated: 06/12/2011  Page url: http://www.perfectforms.com/Documentation/manual/html/?admin_exposing_a_database.htm
PerfectForms™ -- forms software, workflow software, and business process management