X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A80E69FB283 for ; Wed, 3 May 2006 07:24:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 79725-01-9 for ; Wed, 3 May 2006 07:23:39 -0300 (ADT) X-Greylist: delayed 00:31:02.342346 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B6EC79FB392 for ; Wed, 3 May 2006 06:56:04 -0300 (ADT) Received: from mail.codata.be (217.64.244.119.mactelecom.net [217.64.244.119]) by svr4.postgresql.org (Postfix) with SMTP id EADB15B3CF1 for ; Wed, 3 May 2006 09:21:06 +0000 (GMT) Received: FROM [217.112.177.177] BY mail.codata.be with hMailServer ; Wed, 3 May 2006 11:21:00 +0200 Message-ID: <445875FB.7010701@freesurf.fr> Date: Wed, 03 May 2006 11:20:59 +0200 From: Arnaud Lesauvage User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: MS Access & psqlODBC : Primary Key issue Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/6 X-Sequence-Number: 7677 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