Home Products Downloads Purchase Support Contact


Products
Downloads
Purchase
Support
Ocean Mail Server
Help, configuration and tips.
Tutorial: Using ODBC
This page describes in detail how to store your vital user account information in an ODBC data source. For more detailed information on what each option of the ODBC settings is for please view the ODBC Settings page.

 

Understanding ODBC
ODBC stands for Open Database Connectivity, and is designed to simplify how applications communicate with databases. An ODBC connection involves three parts: the ODBC enabled application (Ocean Mail Server), an ODBC driver and an actual database (almost any database technology is supported). Through ODBC, Ocean Mail Server can be plugged into any database, new or old.


Uses of ODBC
Because of the flexibility of ODBC, Ocean Mail Server’s mail accounts can be managed through a database. This creates many exciting possibilities, including integration of the mail server with web scripts and other applications. Using scripting languages such as ASP, you can place scripts on your website which will be able to automatically add new users into the mail server. You could also manage the user list using your favorite database access software or use the database to query the existence of mail accounts.


Setting Up ODBC
To set up ODBC you need to follow these steps:-

  1. Prepare - To setup ODBC you need to first have an understanding of the database you are connecting to. This involves finding out any login information you may need and also installing any ODBC driver that is required.
  2. Create a Data Source - Once you have obtained any information required for connection, you can then create an ODBC data source on the computer. This is usually done by accessing the Control Panel, selecting Administrative Tools and opening the Data Sources (ODBC) application. For example, to add a data source for a Microsoft Access database select the System DSN tab and click Add, choose 'Microsoft Access Driver (*.mdb)' and click Finish, enter a Data Source Name (e.g. OMS) and click Select to browse for the database file, click OK and your data source should now be in the System DSN table.
  3. Configure Ocean Mail Server - Once the data source is created, you then can set up Ocean Mail Server. The most difficult part of configuration is setting up the ‘Connect String’. This is usually in the format ‘DSN=<dsnname>;DATABASE=<databasename>;UID=<username>;PWD=<password>’. If there are any fields that are not needed you can remove these from the connect string. For example, a Microsoft Access data database that does not require login with a data source name of OMS would have a connect string of just 'DSN=OMS'.
  4. Create a Table - Once you have set up ODBC, you may then need to create a table. Simply clicking ‘Create Table’ will test the ODBC connection and create the specified table.


Data Stored by ODBC
The information stored in the ODBC data source is only equivalent to what normal goes into the users.ini file. This is the minimal information required to configure a user but still permits full user control using just the ODBC data source. All other user data is stored in each user's actual account directory.


See Also: ODBC Settings.

©2008 Code-Crafters Software Ltd. All Rights Reserved. Privacy Home Products Downloads Purchase Support Contact