PgSql ODBC + Coldfusion + Solaris

From: Chris Ryan <chris(at)greatbridge(dot)com>
To: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: PgSql ODBC + Coldfusion + Solaris
Date: 2000-08-02 21:03:26
Message-ID: 39888C9E.AD64D12E@greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

This email is to describe what I did to get the PostgreSQL ODBC driver
working with Coldfusion 4.51 (though should work with other versions) on
Solaris.

These are the basic steps needed to get it working. If anyone has any
questions please send me an email as I would be happy to help.

1. Install Coldfusion as normal. I'll reference the Coldfusion install
directory as $CFHOME

2. Install either PostgreSQL with --with-odbc or install the seperate
ODBC interface source.
I'll reference the location of the libpgsqlodbc.so file as
$PGODBCLIB

3. Edit the Coldfusion odbc.ini file $FCHOME/odbc/odbc.ini

under [ODBC Data Sources] add a similar line to:
pgsql=PostgreSQL Datasource

If you want multiple datasources then make multiple lines changing the
datasource name "pgsql" in my example and if you want you can change the
brief description to something more descriptive.

Now in the same file for each datasource you added add similar entries
as below:

[pgsql]
Driver=$PGODBCLIB
Description=PostgreSQL Web Database

4. Now you must determine the home directory of the user that the
webserver running coldfusion is running as. For example most are
'nobody'. In that directory (usually the root directoy 'cd /' on
solaris and other linux systems. A file called ".odbc.ini", the file
must have a period (.) at the begging, should be created. This file is
set up similar to the Coldfusion odbc.ini file. Under the section [Data
Sources] you must put an entry with the same datasource names as you
have for PostgreSQL databases in the Coldfusion odbc.ini. Then you must
have a setion for each data source as below changing the parameters
accordinly for each database.

[Data Sources]
pgsql=pgsql

[pgsql]
Servername = localhost
Port = 5432
Database = database_name
Driver = $PGODBCLIB

5. Log into the Coldfusion Administrator screen under ODBC drivers and
edit each datasource with the options there and you specify the username
and password of the databases there.

6. Kick back and enjoy Coldfusion + PostgreSQL connectivity :)

I hope people find this useful and if this can save someone else in the
future of the headaches i endured figuring this out.

Chris Ryan
chris(at)greatbridge(dot)com

Browse pgsql-interfaces by date

  From Date Subject
Next Message Karl Thomas Diedrich 2000-08-02 21:48:51 Re: Python + PostgreSQL
Previous Message Bill 2000-08-02 19:56:59 Re: JDBC driver writes binary data ONLY as Large Object