Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA11918 for ; Thu, 27 May 1999 11:27:53 -0400 (EDT) (envelope-from djackson@cpsgroup.com) Received: by bjke.com; id KAA11352; Thu, 27 May 1999 10:27:41 -0500 (CDT) Received: from unknown(144.210.12.10) by gauntlet.bjke.com via smap (4.1) id xma011213; Thu, 27 May 99 10:27:24 -0500 Received: by cpsmail with Internet Mail Service (5.5.2448.0) id ; Thu, 27 May 1999 10:27:39 -0500 Message-ID: From: "Jackson, DeJuan" To: JT Kirkpatrick , "'pgsql-sql@hub.org'" Subject: RE: [SQL] select nextval. . . Date: Thu, 27 May 1999 10:27:38 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain > i am connecting to a postgres 6.4.2 database with msaccess97. in that > postgres database i have a sequence defined. in access i have a form, > with > only one textbox -- when i open that form i'd like to populate that > textbox > with the next value in that sequence. i can get the next value from psql > (select nextval('sequencename');), but i can't seem to figure out how to > get that nextval from within access97 into a control on a form. i can > design a pass-through query that inserts the nextval into a database, but > that isn't what i want to do (it also exposes some risk of non-uniqueness > that the sequence helps to ensure). got any ideas?? > > jt > You're going to have to implement this all on your own. As far as I know Access doesn't have a way to start a transaction with a form, therefore sequences lose a lot of their benefits. A viable alternative might be to grab the generated sequence number after the insert, and display it then. -DEJ