Step-by-Step: How To Add and Link Multiple Database to Multiple Pages for Alarm Logging

This article uses Microsoft Access database that comes with the Demo project. To setup PostgreSQL database for SCADA, refer to this article.

  • In Project Editor, create two database and name it mdb_1 and mdb_2.
  • Open project folder, make two copies of dblog.mdb and rename it to dblog_1.mdb and dblog_2.mdb.
  • Copy the codes below and paste it in the Connection String column for mdb_1 and mdb_2.
Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DBQ=<PROJECT>\dblog.mdb;DefaultDir=<PROJECT>\;Driver={Microsoft Access Driver (*.mdb)};"
  • Change the database name (bold) in the codes above from dblog.mdb to dblog_1.mdb for mdb_1 and dblog_2.mdb for mdb_2.
  • Open project folder, make two copies of alarm.htm and rename it to alarm_1.htm and alarm_2.htm.
  • Go to Screen, create two alarm entries, Alarm Plant 1 and Alarm Plant 2
  • Select alarm_1.htm as path for Alarm Plant 1. Select alarm_2.htm as path for Alarm Plant 2.
  • To assign individual database for each alarm pages, open Alarm Plant 1 screen in Project Editor to view the html codes.
  • Scroll down to the end of the codes. Look for “dbgroup“. 
  • Change “msql” to “mdb_1” and Save. Do the same for Alarm Plant 2 screen by changing “msql” to “mdb_2“.
  • Under Alarm, select Group and create two new groups, Group_1 and Group_2. Under Log To column, select mdb_1 for Group_1 and mdb_2 for Group_2.
  • Run the project and you will have two individual alarm databases.

Give it a try an let us know if you require any assistance. Check out our blog for more guides and articles. Good luck!