pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas <maps.on@gmx.net>
To: pgsql-odbc@postgresql.org
Subject: Re: ADO and sequences
Date: Wed, 23 Aug 2006 00:49:28 +0200
Message-ID: <44EB89F8.9020204@gmx.net> (raw)
In-Reply-To: <6.1.0.6.0.20060822131714.05292890@pop.dnvr.uswest.net>
References: <44EB410A.10809@gmx.net>
	<6.1.0.6.0.20060822131714.05292890@pop.dnvr.uswest.net>


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
>



view thread (10+ messages)  latest in thread

Message-ID: <44EB89F8.9020204@gmx.net>
Permalink:  ../44EB89F8.9020204@gmx.net/
Also on:    postgresql.org/message-id/44EB89F8.9020204@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: maps.on@gmx.net
  Subject: Re: ADO and sequences
  In-Reply-To: <44EB89F8.9020204@gmx.net>
  References: <44EB410A.10809@gmx.net> <6.1.0.6.0.20060822131714.05292890@pop.dnvr.uswest.net> <44EB89F8.9020204@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox