10.3. Working with Database

By default, Microsoft Access flat file database is included in a new project when it's created using Project Editor. A database is a basic requirement in a SCADA application. Typically used to store data for Trending, Alarms, Tag Persistence or Report Archiving.

If a more reliable and larger database than Microsoft Access is required, IntegraXor can log to any ODBC-compliant database such as Microsoft SQL, Oracle, MySQL and PostgreSQL. Microsoft has released SQL Express for free with 10 GB data storage limitation, which is sufficient in most applications. It has toolset for database management which can be used to create, modify and view tables. Use this Management Tool to create customized tables for additional database logging requirement or to view logged data. It can be downloaded at http://www.microsoft.com/express/Database/.

To integrate with external databases, engineer need to add an entry into database task, with its relevant "Connection String". A comprehensive list of Connection Strings for various database can be found on this website: http://www.connectionstrings.com/. Commonly used connection string is listed in the following table.

Database Connection String
Microsoft SQL Express
Provider=MSDASQL.1;
Extended Properties="DRIVER=SQL Native Client;
SERVER=<COMPUTER_NAME>SQLEXPRESS;
DATABASE=my_job;
trusted_connection=yes";
PostgreSQL
Driver={PostgreSQL};
Server=IPaddress;
Port=5432;
Database=myDataBase;
Uid=myUsername;
Pwd=myPassword;
MySQL
Driver={MySQL ODBC 5.1 Driver};
Server=localhost;
Database=myDataBase; 
User=myUsername;
Password=myPassword;
Option=3;
[Note] Note

Be aware the ODBC Driver version could be 3.51, or other numbers.


[Important] Important

Be aware the Connection Strings are shown in multiple line for better readability but must be entered as single line in actual use.


Clicking browse button [...] shall launch the Data Link Properties which could Test Connection on the string entered.

After the database is added, tables need to be created by execuiting its respective SQL script which can be obtained accordingly for MS SQL, MySQL, PostgreSQL and Oracle.