X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C6DE8D1B482 for ; Tue, 20 Apr 2004 12:12:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84389-06 for ; Tue, 20 Apr 2004 12:12:39 -0300 (ADT) Received: from ganymede.hub.org (u46n208.hfx.eastlink.ca [24.222.46.208]) by svr1.postgresql.org (Postfix) with ESMTP id 3CAF0D1B470 for ; Tue, 20 Apr 2004 12:12:39 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 5608C3557A; Tue, 20 Apr 2004 12:12:38 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 552BA35570 for ; Tue, 20 Apr 2004 12:12:38 -0300 (ADT) X-Received: from localhost ([unix socket]) by ganymede.hub.org (Cyrus v2.2.3) with LMTP; Tue, 20 Apr 2004 12:06:45 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 80216351BF for ; Tue, 20 Apr 2004 12:06:41 -0300 (ADT) X-Received: from mail.postgresql.org [200.46.204.71] by localhost with IMAP (fetchmail-6.2.5) for scrappy@localhost (single-drop); Tue, 20 Apr 2004 12:06:41 -0300 (ADT) X-Received: from svr1.postgresql.org ([unix socket]) by svr1.postgresql.org (Cyrus v2.2.3) with LMTP; Tue, 20 Apr 2004 11:56:58 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BB817D1E13A for ; Tue, 20 Apr 2004 11:56:58 -0300 (ADT) X-Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 76721-01 for ; Tue, 20 Apr 2004 11:57:00 -0300 (ADT) X-Received: from web20806.mail.yahoo.com (web20806.mail.yahoo.com [216.136.226.195]) by svr1.postgresql.org (Postfix) with SMTP id BADC3D1E0EF for ; Tue, 20 Apr 2004 11:56:55 -0300 (ADT) Message-ID: <20040420145659.19996.qmail@web20806.mail.yahoo.com> X-Received: from [24.248.12.72] by web20806.mail.yahoo.com via HTTP; Tue, 20 Apr 2004 07:56:59 PDT Date: Tue, 20 Apr 2004 07:56:59 -0700 (PDT) From: Jeff Eckermann Subject: Dealing with Insert Problems with Access To: psql-odbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-DCC: : X-Spam-Pyzor: ReSent-Date: Tue, 20 Apr 2004 12:12:34 -0300 (ADT) Resent-From: "Marc G. Fournier" Resent-To: pgsql-odbc@postgresql.org ReSent-Subject: Dealing with Insert Problems with Access ReSent-Message-ID: <20040420121234.F780@ganymede.hub.org> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/112 X-Sequence-Number: 4007 I have just deployed a MS Access client-server application with a PostgreSQL 7.2.4 backend (not that the version matters in this case). I am bumping up against the famous "#Deleted#" in every field issue that comes up on this list from time to time. The problem is that, in this application, the data can be quite sparse for some records, with the result that some records only differ in their primary key value, which is a serial in PostgreSQL. When a new record gets created, Access fails to find a unique record with the same data values, so the error. I don't want to move to unbound forms/controls, so I am looking for a minimalist way to solve the problem, which would involve adding some "before insert" code which will specify a unique value to be inserted. I am looking at two choices: * Do a "nextval" call to get the next serial value, and specify it explicitly. This involves an extra network round trip (and an extra connection), but has the benefit of being unequivocal. * Add a timestamp field to the table, and specify the applicable value in my vba code. This app is not intensively used, so either solution would probably work fine in practice. Is there any reason why I should prefer one over the other? Or is there another kind of solution altogether that I could try? TIA __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash