Data Logger Suite: Logging and Monitoring. SMS from database: Sending short messages from a database
Download and install our software
Sending the confirmation SMS message asynchronously from a database
In this case, the program should read the message text and the number it will be sent to from the database. You can do it by adding a new data source.
- Click the button in the main window of the program (fig. 1) to add a new data source.
Fig. 1. Adding a new data source
- Select the SQL interface type (fig. 2).
Fig. 2. Selecting the interface type
- Configure a connection to the database (fig. 3). The connection is configured similarly to how it is described in the "Configuring writing data to the database with the ODBC database" section in fig. 11.
Fig. 3. Configuring the connection
- Specify the name of the table new text messages will be read from (fig. 4). You should also specify the interval for the program to check for new messages and also the field it is possible to identify new data by. It may be a unique identifier or date and time.
Fig. 4. Configuring reading the data
- Enable the modules for processing data retrieved from the table (fig. 5).
Fig. 5. Data processing modules
- Use the Expressions module to specify the expression that will generate the data packet to be sent to the modem. In this example, NUMBER and SMS are fields from the SMSOUT table (see fig. 4) in the database. CHR(9) is the ASCII tabulation character that serves as a delimiter between the number and the message text.
Fig. 6. Generating the data packet
- Configure the module of redirecting data to the modem (fig. 7). SMS_DATA is the name of the item that is generated in the Expressions module and COM41 is the number of the COM port the modem uses.
Fig. 7. Redirecting data to the modem
- Now, whenever there is new data in the SMSOUT table, the program will read it (fig. 8) and send a text message using the modem (fig. 9).
Fig. 8. Data from the table
Fig. 9. Data redirected to the modem
- SMS GSM modem settings and configuration
- SMS to database: Writing short messages from a GSM modem into a database
- Saving SMS to a database with an acknowledgement
- SMS from database: Sending short messages from a database