SMS Add On Feature(Overview)

(Integrating PC SMS Gateway Server 4.2 with other application)

 

SQL Database Script Tables and Indexes

  • Example I. Inserting SMS Outbox record into SQL Database Table

This example demonstrate how to Send SMS using PC SMS Gateway Server by inserting SMS Outbox Record into Database using SMS default parameter, which means leave nullable table fields with NULL value, then later when the application read the record will be intepreted as default value.

Notes:

  • In the example below the PC SMS Gateway Server SQL Database is using the Microsoft SQL Server 2000
  • The table field Date datatype of the PC SMS Gateway Server is stored as Double datatype. The application Date datatype start from 0 as December, 30 1899.
  • The Microsoft SQL Server 2000 database Date datatype start from 0 as January, 1 1900. The value converting is needing, this is could be done by after the GETDATE() is casted to float, it should be add with 2(two) to compensate the difference date start value.
  • The Microsoft Access database Date datatype start from 0 as December, 30 1899 so no compensating value is necessary when using Microsoft Acces database.

 

STEP 1. Insert SMS Outbox record into database

Example Create Outbox RecipientExample Create Outbox Master

After the SMS record inserted into database, the current SMS appear on Outbox Folder. Inserting SMS directly into Database is another way to Create New SMS than Create New SMS from the application.

PC SMS Gateway Server Outbox Folder

 

 

STEP.2. Check whether the SMS has been successfully sent (to SMS centre), by accessing OUTBOXLOG table.

The SQL script for reading OUTBOXLOG for checking whether the SMS has been sent are,

SELECT * FROM OUTBOXLOG INNER JOIN OUTBOXRECIPIENT ON OUTBOXRECIPIENT.OUTBOXRECIPIENTID=OUTBOXLOG.OUTBOXRECIPIENTID WHERE OUTBOXRECIPIENT.OUTBOXID='OUTBOX1'

 

Beside view the SM Sent status from database, it also could be viewed on Log

View SMS Outbox LogView  SMS Outbox

 

  • Example II. Read SMS Inbox from SQL Database

This example demonstrate how to read received SMS by PC SMS Gateway Server. Simply, read the INBOX table using SQL Script.

View Inbox on SMS Database