MS Access & psqlODBC : Primary Key issue

MS Access & psqlODBC : Primary Key issue

am 03.05.2006 11:20:59 von Arnaud Lesauvage

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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings