SMS Add On Feature(Overview)
(Integrating PC SMS Gateway Server 4.2 with other application)
- The PC SMS Gateway Server stored the data on SQL Database. (Please see the SQL Database Software Development Kit (SDK) for more detailed information)
- To integrate with another application, send/receive SMS from another application could be done by accessing the SQL Database (PC SMS Gateway Server Database).
- The default database on installer is using Microsoft Access 2000,
- Further for optimizing the database performance and or any other purpose purpose, the "Bigger" SQL database that could be used are MySQL (version 5), Microsoft SQL Server(version 2000 or above), or Oracle (version 9 or above) could be used.
- The Database SQL script for generating Tables and Indexes has been included on the installer.

-
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


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.

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


-
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.
