4. Testing the ODBC installation

To test the ODBC installation simply run odbctest, iodbctest or iodbctestw and give our DSN (DSN=PgSQL). If you can not find this program on your system, it is part of the iODBC distribution, you can download it at www.iodbc.org.
Output must be as follow. If you don't have the SQL prompt you may have problem with ODBC and OpenLDAP SQL backend should not work as wanted.


/usr/local/bin/odbctest or /usr/local/bin/iodbctest

	iODBC Demonstration program
	This program shows an interactive SQL processor

	Enter ODBC connect string (? shows list): DSN=PgSQL
	Driver: 07.02.0005

	SQL> select count(*) from atable;

You can also use the isql command line utility that come with UnixODBC as follow:


(usage: isql -v DSN user password)

isql -v PgSQL test test
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from atable;