Re: ADO and sequences

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: ADO and sequences
Date: 2006-08-22 22:49:28
Message-ID: 44EB89F8.9020204@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Benjamin Krajmalnik 2006-08-23 00:21:27 Re: ADO and sequences
Previous Message Johann 2006-08-22 19:20:50 Re: ADO and sequences