You are here: Installing ListManager > After You Install > Synchronizing Data Using ODBC > Sample ODBC Connection Strings and Queries

Sample ODBC Connection Strings and Queries

 

MS SQL  

Driver={SQL Server};Server=lmtest;Database=lmdb;Uid=sa;Pwd=pass

 

Oracle  

DSN=DSN_Name;Server=lmtest;Uid=lmuser;Pwd=pass

 

MySQL For Unix:  

Driver={MySQL ODBC 3.51 driver};server=lmtest;database=lmdb;uid=mysqluser;pwd=pass;

 

MySQL for Windows:

Driver={MySQL ODBC 3.51 driver};server=lmtest;database=lmdb;uid=mysqluser;pwd=pass;

 

Sample Connection Using DSN

If your driver uses DSN, the connection information in the odbc.ini file will be used to authenticate and connect to the database. No connection string is required; instead, indicate the Data Source Name. Example:

 

DSN=mysql

 

Sample odbc.ini File

[ODBC Data Sources]
[mysql]
Driver = /usr/lib/libmyodbc3.so
Description = MySQL on lmtest
SERVER = lmtest
USER = lmuser
Password = pass
OPTION = 3

 

 

Sample Select Query

This query is connecting to a table called info. The state field has been added to the ListManager Members_ table.

 

select info.email as EmailAddr_,
info.status as MemberType_,
info.state as state
from info

 

Important Query Notes

 

More

1. ODBC

1. ODBC on Unix

2. ODBC on Windows

3. Sample ODBC Connection Strings and Queries

2. Database Connections

1. New Database Connection