X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 6C8689FB2C0 for ; Tue, 22 Aug 2006 19:44:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 57254-02 for ; Tue, 22 Aug 2006 22:44:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by postgresql.org (Postfix) with SMTP id F1A659FB257 for ; Tue, 22 Aug 2006 19:44:21 -0300 (ADT) Received: (qmail invoked by alias); 22 Aug 2006 22:44:20 -0000 Received: from i3ED6C197.versanet.de (EHLO [192.168.0.108]) [62.214.193.151] by mail.gmx.net (mp019) with SMTP; 23 Aug 2006 00:44:20 +0200 X-Authenticated: #14269776 Message-ID: <44EB89F8.9020204@gmx.net> Date: Wed, 23 Aug 2006 00:49:28 +0200 From: Andreas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8.0.6) Gecko/20060729 SeaMonkey/1.0.4 MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: ADO and sequences References: <44EB410A.10809@gmx.net> <6.1.0.6.0.20060822131714.05292890@pop.dnvr.uswest.net> In-Reply-To: <6.1.0.6.0.20060822131714.05292890@pop.dnvr.uswest.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.951 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/77 X-Sequence-Number: 8041 Thanks, I did it that way but I'd like to have a workaround that doesn't tie my application to one single RDBMS. My initial plan was to create an adodb-connection to the current db backend on start of my application and the rest of the program wouldn't need to be aware what RDBMS actually manages the data in this session. This would be postgres in my LAN and JET directly accessing MDB-files on a notebook pc where I'd rather not always run a server in the background. Johann schrieb: > Easiest way I've found is to read NextVal on the relevant sequence, > and use the value you get for the key field. > > Since the field will be loaded, the "default" function that assigns > the number, kind of like an Access Autonumber - will *not* override > the value you manually insert. > > So: > Get nextval on sequence > .addnew > recordset!idfield = thenextvalyougot >