Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 65B4E475925 for ; Fri, 10 Jan 2003 06:47:32 -0500 (EST) Received: from haeb.noc.uk.easynet.net (haeb.noc.uk.easynet.net [195.40.7.191]) by postgresql.org (Postfix) with ESMTP id 5D2344758DC for ; Fri, 10 Jan 2003 06:47:31 -0500 (EST) Received: (from haeb@localhost) by haeb.noc.uk.easynet.net (8.9.3/8.9.1) id LAA78391 for pgsql-odbc@postgresql.org; Fri, 10 Jan 2003 11:47:33 GMT (envelope-from haeb) Message-Id: <200301101147.LAA78391@haeb.noc.uk.easynet.net> Subject: Re: Problems with PGSQL ODBC drivers In-Reply-To: from "Henshall, Stuart - Design & Print" at "Jan 9, 2003 2:53:30 pm" To: pgsql-odbc@postgresql.org Date: Fri, 10 Jan 2003 11:47:33 +0000 (GMT) From: Harry Broomhall Reply-To: "Harry Broomhall" X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/48 X-Sequence-Number: 2547 Henshall, Stuart - Design & Print writes: > So that MS Access can auto work out which field to use as a key I first of > all create a view as a table with primary key and then create a select rule. Thinking about this further, it occurs to me that if the driver routines for SQLSpecialColumns returned the actual Primary Key for a table (if it existed) rather than OID then Access may have the required hint? The sort of scheme I had in mind goes something like this: if (view) return SQL_NO_DATA else if (table) { if (primary key esists) return all elements of PK. else if (oid exists) return oid else return SQL_NO_DATA } Or am I way off-beam with this idea? Regards, Harry.