Thread: odbc, postgresql and cobalt Qube/RaQ3

odbc, postgresql and cobalt Qube/RaQ3

From
David Millen
Date:
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@largesalad.co.uk
web1 : www.largesalad.co.uk
web2 : www.p21.co.uk










RE: odbc, postgresql and cobalt Qube/RaQ3

From
Peter Mount
Date:
I've been trying to get StarOffice working with PostgreSQL via JDBC, but so
far I haven't had much joy (problem is getting the driver to load). I'm not
sure about ODBC however.

Apart from that, how is postgresql running on the Cobalt? I'm streamlining
my home connection, and I may have the chance of getting a Cobalt RAQ3 to
use as my web server instead of my ISP (works out about the same price), so
I'd be interested in hearing how things go with them.

Peter

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council


-----Original Message-----
From: David Millen [mailto:dave@largesalad.co.uk]
Sent: Sunday, July 09, 2000 3:53 PM
To: PosrgreSQL Interfaces
Subject: [INTERFACES] odbc, postgresql and cobalt Qube/RaQ3


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@largesalad.co.uk
web1 : www.largesalad.co.uk
web2 : www.p21.co.uk









Re: odbc, postgresql and cobalt Qube/RaQ3

From
Tom Lane
Date:
David Millen <dave@largesalad.co.uk> writes:
> 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.

psql will do local connections via a Unix-domain socket, whereas I
believe ODBC always wants to use a TCP connection.  So, a couple of
obvious things to check: is the postmaster started with "-i" switch to
enable TCP connections?  Do you have an entry in pg_hba.conf allowing
connections from the proper IP address?

If you can get psql to start with "-h localhost" then this is the
wrong answer.
        regards, tom lane


Re: odbc, postgresql and cobalt Qube/RaQ3

From
Allan Kelly
Date:
Peter Mount wrote:
> 
> I've been trying to get StarOffice working with PostgreSQL via JDBC, but so
> far I haven't had much joy (problem is getting the driver to load). I'm not
> sure about ODBC however.
> 
> Apart from that, how is postgresql running on the Cobalt? I'm streamlining
> my home connection, and I may have the chance of getting a Cobalt RAQ3 to
> use as my web server instead of my ISP (works out about the same price), so
> I'd be interested in hearing how things go with them.
> 
> Peter

I had an issue with StarOffice on Windows98: I could only get the first 50 rows
of the tables. This could be a driver/settings issue, but I doubt it as Excel
works perfectly. Hence, we are still using Excel company-wide =(. Expensive.

As for the Cobalt machines, I can't see a problem. I run all our offices through
Qubes for internet access, and the main issue is raw speed: the Qube with 16Mb
memory is pushed with it's 166 Mb processor. However, it compiled and happily
runs squid, vim, and everything else which does not need X libs. postgres should
be fine, after all it's just a fancy disk access tool and samba runs very well
;)

al.

-- 
# Allan Kelly                                http://www.plotsearch.co.uk# (+44) (0)1506 417130 x 229#
allan.kelly@buildstore.co.uk...    ..# /Software Engineer/i            . .    .    . .# ------------------------------
*      . .     .    . .# "'If I dare you to jump off a bridge     *       . .     .#  and you do it, you're stupid,'
policesaid."     *       .  . .# Darwin Awards, June 2000                                   *     . .#
------------------------------     vi: set noet tw=80 sts=4 ts=8  : .