Postgres ODBC woes

Started by Steve Quezadasover 25 years ago4 messagesgeneral
Jump to latest
#1Steve Quezadas
steveeq2@tripperjones.com

Hello,

I am new to postgres and I am having trouble hooking it up to a Microsoft
Access database via ODBC. I am able to CONNECT to the postgres database
server and have both tables appear in the "tables" section of Access. But
once I double click on one of the tables in MIcrosoft Access (which is an
empty table), all I get is a completly blank table where I can't even insert
a record. When I try double clicking on the other table (which has a single
record in it), Access complains "ODBC--call failed" without another
explanation dialogue box following it. I don't know why it would fail like
that.

Here are a few questions:
1) Where are the postgres log files? I see pg_log in /usr/local/pgsql/data,
but it seems to be encrypted or something
2) I notice in /usr/local/pgsql there is a file called "odbcinst.ini". Am I
supposed to alter this file?
3) Where in the Postgres manuals does it describe how to install an ODBC
connection. I can't seem to find it.

#2Stefan Huber
schweinsaug@crosswinds.net
In reply to: Steve Quezadas (#1)
Re: Postgres ODBC woes

Hi Steve,

first of all: which ODBC driver do you use? and which PostgreSQL Version?
I've been using Postgers 7.0 and 7.0.2 with postdrv.exe (SFX) for Driver
Version 6.5

2) I notice in /usr/local/pgsql there is a file called "odbcinst.ini". Am
I supposed to alter this file?

Normally you don't even need that file.

You should watch out for the SFX-Archive postdrv.exe and install it. Make
sure, all settings are correct for the driver itself: You say, inserting
fails. That's because normally the driver is readonly (this is just a
checkbox to unclick). Are you using a SystemDSN for accessing your
PostgreSQL DB?
Make sure you are allowed to access the database from your Windowscomputer.

Stefan

#3Steve Quezadas
steveeq2@tripperjones.com
In reply to: Steve Quezadas (#1)
Getting "#Name?" in Microsoft access ODBC

I seem to be having a weird problem With Postgres (7.02) using the new 6.5
version of the ODBC driver (postdrv.exe). If I use psql and show the
contents of a table in command line mode, the table comes up fine. If I try
to pull up the same table in Microsoft Access with ODBC, I first get an
error that says "ODBC--call failed" and then the table comes up with a bunch
of fields that same "#Name?".

I tried playing around with the ODBC driver and nothing I did seemed to be
able to change this. Also tried google, and newsgroups but couldn't come up
with much. Anyone out there know is wrong?

- Steve

#4Louis Bertrand
louis@bertrandtech.on.ca
In reply to: Steve Quezadas (#1)
Re: Postgres ODBC woes

Steve,

Have a look at the log files: C:\psqlodbc_*.log on your windows box.

Make sure your ODBC and PostgreSQL versions are not mismatched.

I've successfully connected in the past with Access 97/ Win 95 to OpenBSD
2.7 and PostgreSQL 6.5.3, but I haven't tried lately with Access 2000 and
PosstgreSQL 7.

Ciao
--Louis <louis@bertrandtech.on.ca>

Louis Bertrand http://www.bertrandtech.on.ca/
Bertrand Technical Services, Bowmanville, ON, Canada
Tel: +1.905.623.1500 Fax: +1.905.623.3852

OpenBSD: Secure by default. http://www.openbsd.org/

On Wed, 27 Sep 2000, Steve Quezadas wrote:

Show quoted text

Hello,

I am new to postgres and I am having trouble hooking it up to a Microsoft
Access database via ODBC. I am able to CONNECT to the postgres database
server and have both tables appear in the "tables" section of Access. But
once I double click on one of the tables in MIcrosoft Access (which is an
empty table), all I get is a completly blank table where I can't even insert
a record. When I try double clicking on the other table (which has a single
record in it), Access complains "ODBC--call failed" without another
explanation dialogue box following it. I don't know why it would fail like
that.

Here are a few questions:
1) Where are the postgres log files? I see pg_log in /usr/local/pgsql/data,
but it seems to be encrypted or something
2) I notice in /usr/local/pgsql there is a file called "odbcinst.ini". Am I
supposed to alter this file?
3) Where in the Postgres manuals does it describe how to install an ODBC
connection. I can't seem to find it.