Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-odbc by date

Next:From: Benjamin KrajmalnikDate: 2006-08-23 00:21:27
Subject: Re: ADO and sequences
Previous:From: JohannDate: 2006-08-22 19:20:50
Subject: Re: ADO and sequences

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group