*************************************************************
THE SITUATION:
*************************************************************
1) I compiled and installed postgresql-6.4.2 on my redhat
linux with option "--with-odbc" for "./configure"
2) I compiled and installed libiodbc-2.50 by doing:
./configure
make
make install
3) I have a "postgres" system user and a "postgres" user for postgres
4) "postgres" user has a database "postgres"
5) "postgres" .odbc.ini (/home/postgres/.odc.ini) has the following lines:
;
; odbc.ini
;
[ODBC Data Sources]
PostgreSQL = Citta Italiane
[PostgreSQL]
Driver = /usr/local/pgsql/lib/libpsqlodbc.so.0.25
Servername = localhost
Database = postgres
Port = 5432
TRACE = ON
6) /usr/local/pgsql/odbcinst.ini is the following:
[PostgreSQL]
Debug = 0
CommLog = 1
***********************************************************
THE PROBLEM
***********************************************************
I can't access postgres using odbc:
for example using php (the command "odbc_connect") I have the following
message:
Warning: SQL error: [iODBC][Driver Manager]Data source name not found and
no default driver specified. Driver could not be loaded, SQL state
IM002 in SQLConnect in /usr/local/apache_1.3.4/htdocs/phptry/iodbc.php3 on
line 10
if I execute odbctest being user "postgres" and I choose
DSN=PostgreSQL I only have "Have a nice day" and
my odbc.log is the following:
SQLAllocEnv ( ... )
SQL_SUCCESS
SQLAllocConnect ( ... )
SQL_SUCCESS
SQLDriverConnect ( ... )
SQL_NO_DATA_FOUND
SQLError ( ... )
SQL_NO_DATA_FOUND
SQLError ( ... )
SQL_NO_DATA_FOUND
SQLFreeConnect ( ... )
SQL_SUCCESS
SQLFreeEnv ( ... )
SQL_SUCCESS
I hope when you have a little time you can help me, and my feedback will
be useful.