MS Access & psqlODBC : Primary Key issue

From: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>
To: pgsql-odbc(at)postgresql(dot)org
Subject: MS Access & psqlODBC : Primary Key issue
Date: 2006-05-03 09:20:59
Message-ID: 445875FB.7010701@freesurf.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi List !

I am trying to st up MS Access (2000) as a frontend for PostgreSQL
(8.1.2) using psqlODBC (8.01.0200).
There used to be a web site on this subject, but www.scw.org seems
to be offline.

There seems to be a problem with Access not recognizing my primary
keys. It works for some tables, but not for others.
My ODBC data source is configured as this :
Checked :
Disable Genetic Optimizer
KSQO
Recognize Unique Indexes
Parse Statements
Unknown Size Maximum
Text as LongVarChar
LF <-> CR/LF conversion
Row Versionning
True is -1
Int8 As Default

The problematic table is :
CREATE TABLE geo_pays
(
gid int4 NOT NULL DEFAULT nextval('geo_pays_gid_seq'::regclass),
codecontinent int8,
codepays int8 NOT NULL,
payspopulation int8,
payscapitale varchar(100),
payssuperficie varchar(50),
paysdensite varchar(50),
payspib varchar(50),
CONSTRAINT geo_pays_pkey PRIMARY KEY (codepays),
CONSTRAINT geo_pays_continents_fkey FOREIGN KEY (codecontinent)
REFERENCES geo_continents (codecontinent) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE NO ACTION
)
WITHOUT OIDS;

In MSAccess, I link the table without any problem. Access does not
ask me for a unique row identifier (it does for some other tables,
but not for this one), *but* the primary key that it automatically
detects is payspopulation !!! There isn't even an index on this
column !

What is the problem with my configuration ?

Thanks for your help !

Regards
--
Arnaud

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2006-05-03 10:20:50 [ psqlodbc-Bugs-1000626 ] Follow-up to 1000625
Previous Message noreply 2006-05-03 08:43:41 [ psqlodbc-Bugs-1000627 ] can't use stored functions