Ozeki NG SMS Gateway

Send and receive SMS from MS Access

This guide gives you some tips to get you started on sending or receiving SMS messages from Microsoft Access. It gives you the initial installation steps to take to setup Ozeki NG to work with your Access database.


Ozeki NG can connect to an Access database through an ODBC or through an OLEDB connection. It uses two Access tables. One table is used for sending SMS messages the other table is used for receiving SMS messages. The table structures match the table structure used in the MS SQL database configuration. Ozeki NG uses SQL statements to work with these tables through the ODBC (or OLEDB) connection.

Getting started

To send SMS messages from access, you need to configure a service provider connection. The quick start guide for sending SMS gives you the steps to do this. After you are able to send and receive SMS messages manually from the Ozeki User interface, you can configure the Access database connection. To do this, go to "Add new user" in the main menu, and select the database option. (Figure 1).

Figure 1 - Start the installation of a database connection

The next step is to provide a unique name for this connection. In our example we provide "Access1" as the name for the connection (Figure 2).

Figure 2 - Provide a unique name for the connection

Once this is done you are ready to configure the connection parameters.

Configuring the database connection

To connect your SMS gateway to Access, please select ODBC as the connection method and provide the connection string that points to your database (Figure 3).

Figure 3 - Setting the connection string

The above connection string specifies a connection string with standard security. The connection string points to your access database (*.mdb) and it contains the username and password. These values must be set to match your system. You can use the following connection strings depending on your requirements:

Standard security:

Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;


Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;SystemDB=C:\mydatabase.mdw;


Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Exclusive=1;Uid=admin;Pwd=;


To enable certain pragmatically admin functions such as CREATE USER, CREATE GROUP, ADD USER, GRANT, REVOKE and DEFAULTS (when making CREATE TABLE statements) use this connection string.

Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;ExtendedAnsiSQL=1;

Locale identifier:

Use this one to specify the locale identifier which can help with non-US formatted dates or special character sets. The example bellow uses the en-gb locale identifier (2057)

Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Locale Identifier=2057;Uid=Admin;Pwd=;

SQL templates

After you have set the connection string, to get the access connection working, you also have to change the SQL templates. The most important thing to do, is to remove the apostrophe around the $id keyword in all SQL templates. By default the SQL templates used in the Database configuration are not going to work in Access. The following figures (Figure 4-8) show you which templates should be changed. The change is minor.

Figure 4 - Modify the sending SQL template.

Figure 5 - Modify the sent SQL template.

Figure 6 - Modify the Not Sent SQL template.

Figure 7 - Modify the delivered SQL template.

Figure 8 - Modify the undelivered SQL template.

After these configurations have been completed, you can send SMS messages from your access database by inserting a record into the outgoing database table. The Ozeki software will pickup your record and send it as an SMS message.

More information