Re: PostgreSQL serials in MS-Access are writable, but they are supposed to be read-only - Mailing list pgsql-odbc

From Joel Burton
Subject Re: PostgreSQL serials in MS-Access are writable, but they are supposed to be read-only
Date
Msg-id 20020604011132.2880F2B95F@temp.joelburton.com
Whole thread Raw
In response to PostgreSQL serials in MS-Access are writable, but they are supposed to be read-only  ("Antti Toivanen" <antti.toivanen@telemerkki.fi>)
List pgsql-odbc
Antti Toivanen <antti.toivanen@telemerkki.fi> said:

> -----Original Message-----
> From: Antti Toivanen [mailto:antti.toivanen@telemerkki.fi]
> Sent: 29 May 2002 17:02
> To: Dave Page
> Subject: RE: [pgadmin-support] Migration from MS Sql server using the
> plug-in
>
> Hi again!
>
>
>
> Okay, I did as you told me to.
>
> Basicly the PostgreSQL's serial_col now works as supposed.
>
>
>
> But I ran to a another problem, altough it is not related to the
> Migration plugin nor pgAdmin.
>
>
>
> The MS-Access doesn't regognize the ID field as a Auto_Increment.
>
> For example: this is problem if I want to copy a record from table A to
> table B with ADO (or DAO), field by field.
>
> If the procedure doesn't know which fields are writable and which arent
> (the Auto_Increment from PostgreSQL is writable), it might try to create
> a duplicated key since it copies it from the old record.
>
>
>
> Do you know a fully Access compatible way to handle this without
> possible code modifications, or can you address it for those who can
> make such a way possible?

Unlike Access' Auto_Increment fields, which are always read-only, PG (& most
other databases) uses sequences, which _can_ get the next number, or can
allow you to supply a number.

In my Access front-ends, I usually hide this column in datasheet view, and,
change the properties of the textbox on form view to mark it as read-only.
Very easy to do.

- J.

--

Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant



pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: int8 becames string in BDE :-(
Next
From: SZ?CS Gabor
Date:
Subject: Re: int8 becames string in BDE :-(