SMS from/to SAP SQL Anywhere
See how to send and receive SMS messages through an SAP SQL Anywhere server with the Database User of Ozeki SMS Gateway. Here you can find a connection string and short CREATE TABLE statements to get started. You can send messages by inserting new message records.
You should have two important programs. The first one is an SAP SQL Anywhere server, while the second one is Ozeki SMS Gateway, which must have a Database User installed, so it can connect to the SAP SQL Database Server using a connection string. Please create a table for the incoming messages and another table for the outgoing messages. You should call these tables as 'ozekimessagein' and 'ozekimessageout', which is used in the current example. You can see your received SMS messages by using a simple SELECT and you can send SMS message with a simple INSERT SQL statement.
The browser GUI of Ozeki SMS Gateway can be used for installing a Database User. Please provide the ODBC connection string for your SAP SQL Anywhere database. The Database User can be configured from the browser GUI. Keep in mind to select 'Odbc' and type the connection string (Figure 2).
Please use the information of your SAP SQL Anywhere server and change the connection string variables (Figure 2).
SAP SQL Anywhere CREATE TABLE script
Please create the 'ozekimessageout' and 'ozekimessagein' tables on your SAP SQL Anywhere database server.
The size of the 'msg' field can be always increased above 160 characters. You can also change it's data type as well.
The index of each record is the 'id' attribute. Please maintain the 'id' in all tables.