As Of 01 08 2008

Backing up “sms_log” table data

Task 17 - Completed

All the SMS received by the system are backed up into “sms_log” table. This is been done by SMSReader table. There is always possibility that “sms_log” table getting bigger over time. There is a possibility that this would slow down the system. Therefore it is good practice to backup this table from time to time.

The system in Kent Ridge MRT will be running 24/7. Therefore the backup should happen automatically. This is handled by DataProcessor application. The configuration file has a value indicating when to backup.


Fig 1. DataProcessor configuration file editor

following SQL used to check for number of entries in the "sms_log" table

String^ sql = "SELECT COUNT(*) FROM sms_log";

The system from time to time checks number of entries in the “sms_log” table. If the entries exceeded the value all the data is backed up to a text file. This file will be created inside “SMS_LOG” folder. It should be in the same folder as the exe file.

The file name of the log file is of the following format.

Sms_log _ date _ time _ .txt

String^ file_name = "SMS_LOG\\sms_log_" + dt->ToShortDateString() + "_" + dt->ToLongTimeString();
file_name = file_name->Replace("/","_")->Replace(":","_")->Replace(" ","") + ".txt";

example file name would be:- sms_log_7_30_2008_9_18_47PM.txt

After creation of the log file all the entries in the "sms_log" get deleted.


Task 18 – Completed

The client requested that the system should generate some revenue in order to cover maintenance and running costs. The idea is to place a running ticker at the bottom of the display screen, similar to those seen in many TV news programs. I have completed the development of administration tool for this.


Fig 2. Advertisements editor

The system can manage text and images in the ticker. As shown in Figure 2, the administrator can add text or image to the ticker. He can also set the order they are appearing using order field. The information added here is held in “advertisements” table.


Fig 3. “advertisements” table

The type field indicate image (1) or text (0)

If type == 0
    ad_text = text advertisement message
    ad_text = name of the image

Fig 4. Manage images

Images can be added to the system using the normal image tab as shown in Figure 4. So the system can have a common image up loader. To associate image with advertisement the administrator has to click the link “Select image for advertisement”. This would associate selected image with current advertisement in add or edit mode. If an image associate with an advertisement get deleted, it would intern delete the advertisement itself.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.