Skip site navigation (1) Skip section navigation (2)

odbc, postgresql and cobalt Qube/RaQ3

From: David Millen <dave(at)largesalad(dot)co(dot)uk>
To: PosrgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: odbc, postgresql and cobalt Qube/RaQ3
Date: 2000-07-09 14:53:22
Message-ID: 396891E1.9BD3B85C@largesalad.co.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,

I have just started with a new company which uses Cobalt Qube's and
RaQ3's (Basically Red Hat 6.x Linux) as servers. These come with
Postgres pre-installed. The company also uses Star Office, company
policy being to only use M$ products if there is no alternative.

I have to do the backend programming(cgi, php, asp, perl) and desktop
apps for the company intraweb and, since the intraweb has to be designed
to run on different platforms (IIS, apache and Netscape servers), ODBC
seems to be the most appropriate method of accessing Postgres for
browser-based interfaces, with Star Office or possibly Visual Basic
being used for the apps.

On Friday, I set up a database and created some test tables and users.
This works fine with psql and I'm quite happy with this. BTW team, this
is the first time I've used postgresql since 6.1, nice work!

Since the server I am configuring is live and can't be allowed to go
down, I decided to leave things at that and try out the odbc end on my
home system, again Red Hat 6.0/Postgresql 7.0.2. This system has MySQL
and MyODBC installed on it already, working perfectly both with Star
office on the same machine and as a network odbc data source.

I installed all the binary rpms, including odbc and edited
/etc/odbc.ini, /etc/odbcist.ini and ~/.odbc.ini to point to all the
correct places.

Again, from psql, the system works well and the pg* commands that I have
tried work, but I can't get a PostgreSQL ODBC connection from Star
Office on the host machine, which *does* work with MyODBC, and
unfortunately, my wife's machine has gone feet up so I can't test
networked ODBC.

The data source 'testdb' shows up in the browse section of the Star
Office Database app, but gives the following error on selecting the
'Tables' tag: 'The database connection failed. Please check if you chose
the correct database directory/datasource name and, if required,
password/userid.' (which are all as required)

Included below are the contents of the various configuration files - if
anyone can see anything that I am omitting or doing incorrectly, please
let me know:

# /etc/odbcinst.ini
[ODBC]
Trace  = Yes
Trace File  = /tmp/sql.log

[MyODBC]
Description  = MyODBC
Driver  = /usr/lib/libmyodbc-2.50.28.so
Setup  = /usr/lib/libodbcmyS.so.1.0.0
FileUsage  = 1

[PostgreSQL]
Debug = 0
CommLog = 1
Description  = PostgreSQL
Driver  = /usr/lib/libpsqlodbc.so

# /etc/odbc.ini / ~/.odbc.ini
[ODBC Data Sources]
Myodbc  = Myodbc
PostgreSQL = PostgreSQL
amaccom  = amaccom
testdb  = testdb

[Myodbc]
Driver  = MyODBC
HOST  = localhost

[PostgreSQL]
Driver  = PostgreSQL
HOST  = localhost

[amaccom]
Trace  = On
TraceFile = /root/myodbc-trace
Description = MyODBC
Driver  = MyODBC
DSN  = amaccom
SERVER  = localhost
USER  = andy
PASSWORD = <andy's passwd>
PORT  = 3306
OPTIONS  = 1
DATABASE = amaccom

[testdb]
Debug = 1
CommLog = 1
ReadOnly = 0
Description = PostgreSQL
Driver = PostgreSQL
DSN = testdb
Servername = localhost
Username = testuser
Password = <password>
Port  = 5432
Database = testdb

[Default]
#Driver  = /usr/lib/libmyodbc-2.50.28.so
Driver  = /usr/lib/libpsqlodbc.so

Three questions:

1. Am I just being thick and doing something stupid ?
2. Does Star Office not work with the PostgreSQL ODBC connection ?
3. Is anyone using ODBC on the standard Cobalt distribution of
PostgreSQL, I'd be grateful for any help.

TIA,
Dave
--
He was part of my dream, of course
-- but then I was part of his dream too.
                -- Lewis Carroll

email: dave(at)largesalad(dot)co(dot)uk
web1 : www.largesalad.co.uk
web2 : www.p21.co.uk









Responses

pgsql-interfaces by date

Next:From: Rudi PermanaDate: 2000-07-09 22:48:32
Subject: libpgtcl.so
Previous:From: tim.brookesDate: 2000-07-07 19:54:18
Subject: curious memory leak

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group