Before you can log values to a database, you will need to have 1) a database containing two tables as described below and 2) an ODBC DSN configured for your database.
Setting up a database
You can use any ODBC compatible database such as MS-Access, MS-SQL, MySQL, Oracle, etc. Instructions on how to install and configure a database program are beyond the scope of this documentation.
Once you have a database created, you will need two tables within it to hold the data that VTS will export. In the TEMPLATE directory under VTS (normally found as C:\VTS\TEMPLATE) there are four files to help you with this task.
• SQLLoggerAccess.mdb
• SQLLoggerMySQL.sql
• SQLLoggerOracle.SQL
• SQLLoggerSQLServer.SQL
The three files which end with the extension ".sql", contain SQL commands to create the tables you will need in your database.
If you do not have a database and do not own a database program, you can still use this feature of VTS/VTScada by following these steps:
From the template directory of VTS, copy the file named SQLLoggerAccess.mdb to your application directory.
Rename it to match the data you plan to collect, being sure to keep the .mdb extension on the name.
You are now ready to proceed.
Configuring an ODBC DSN
This is created using the Windows™ Open Data Base Connectivity (ODBC) tool found in the Administrative Tools section the Windows™ configuration menu. The example below shows the screens you would see if configuring a System DSN for a Microsoft Access database. As shown, the name can be anything you like. the Database Select button allows you to select a .MDB file on your computer or network.
Note: This must be done on all potential servers for a networked VTS application. The DSN must be identical on each machine.
