Re: ADO and sequences - Mailing list pgsql-odbc

From Andreas
Subject Re: ADO and sequences
Date
Msg-id 44EB89F8.9020204@gmx.net
Whole thread Raw
In response to Re: ADO and sequences  ("Johann" <johann@tygerpos.com>)
Responses Re: ADO and sequences  ("Johann" <johann@tygerpos.com>)
List pgsql-odbc
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
>

pgsql-odbc by date:

Previous
From: "Johann"
Date:
Subject: Re: ADO and sequences
Next
From: "Benjamin Krajmalnik"
Date:
Subject: Re: ADO and sequences