Laserfiche WebLink
Generic Database Data s tore <br />Appendix – Generic Database Data s tore - 2 <br />The work -around is that any floating point data column that has a precision of zero is treated as <br />having a precision of 6 digits after the decimal point. <br /> <br />Data s tore Configuration Files <br /> <br />A datastore is configured by enabling the datastore in the main TSTool.cfg configuration file, and creating <br />a datastore configuration fi le for each connection. Configurations are processed at software startup to <br />enable datastores . An example of the TSTool configuration file is shown below. Multiple datastores can <br />be defined using the [D ataStore:DataStoreNam e] syntax. Properties for eac h datastore are <br />specified in an accompanying configuration file described after the following example. <br /> <br /># Configuration file for TSTool <br /> <br />...properties omitted… <br /> <br /># Startup datastores (note that datastore name in config file takes precedence) <br /> <br />[DataStore:Som eDatabaseDataStore ] <br />ConfigFile = "SomeDatabaseDataStore .cfg" <br />TSTool Configuration File with Generic Database Data s tore Properties <br /> <br />The following illustrates the generic database datastore configuration file format , which in this example is <br />located in the same folder as the TSTool configuration file . <br /> <br /># Configuration information for "SomeDatabaseDataStore " datastore (connection). <br /># <br /># The user will see the following when interacting with the datastore: <br /># <br /># Type – GenericDatabaseDataStore (required as indicat ed) <br /># Name - database identifier for use in applications, for example as the <br /># input type/name information for time series identifiers (usually a short string) <br /># Description - database description for reports and user interfaces (a sentence) <br /># Enabled – whether the datastore is enabled (default=True) <br /># <br /># The following are needed to make the low -level data connection: <br /># <br /># DatabaseEngine - the database software (SqlServer) <br /># OdbcName – ODBC name (specify this OR the following properties) <br /># DatabaseServer - IP or string address for database server <br /># DatabaseName - database name used by the server <br /># SystemLogin – the login to be used for the database connection <br /># SystemPassword – the password to be used for the database connection <br /># <br /># Property values can use the notation “Env:xxxx” to use an environment variable, <br /># “SysProp:xxxx” to use a JRE system property, or “Prompt” to prompt the user for <br /># the property value (system console is used – not suitable for TSTool startup from <br /># the Start menu ) <br /> <br />Type = "Generi cDatabase DataStore" <br />Name = "SomeDatabaseDataStore " <br />Description = "Database on some server " <br />Enabled = True <br />DatabaseEngine = "SqlServer" <br /># Specify OdbcName… <br />OdbcName = "OdbcName" <br /># Or, specify the following… <br />DatabaseServer = "ServerName " <br />DatabaseName = "Data baseName " <br />SystemLogin = "LoginForConnection" <br />SystemPassword = "PasswordForConnection" <br />Generic Database Data s tore Configuration File <br /> <br />28