pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feed[INTERFACES] MSAccess and primary keys
4+ messages / 4 participants
[nested] [flat]
* [INTERFACES] MSAccess and primary keys
@ 1999-05-15 08:34 leif@danmos.dk
0 siblings, 1 reply; 4+ messages in thread
From: leif@danmos.dk @ 1999-05-15 08:34 UTC (permalink / raw)
To: pgsql-interfaces
[Sorry for reposting this, the subject got garbled.]
Hello,
I have a rather anoying problem. I am linking a quite large
M$Access application to a PostgreSQL database with a a lot of
relations (primary keys/foreign keys). In all my tables I have
created primary keys (to keep M$Access happy ;-). Unfortunately,
when I link my application to the database, Access asks me for
each and every table (there are more than 80 of them) what I
want to use for unique index field. I thought the primary key
spec would do just that?
All tables are designed like the one below:
create table globalafvigelse
(
id serial ,
startdato date,
slutdato date,
dagskema varchar(50),
primary key (globalafvigelse)
);
Greetings,
Leif
(leif@danmos.dk)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] MSAccess and primary keys
@ 1999-05-15 13:19 Geoffrey C. Speicher <geoff@sirius.trassociates.com>
parent: leif@danmos.dk
0 siblings, 1 reply; 4+ messages in thread
From: Geoffrey C. Speicher @ 1999-05-15 13:19 UTC (permalink / raw)
To: pgsql-interfaces
On Sat, 15 May 1999 leif@danmos.dk wrote:
> create table globalafvigelse
> (
> id serial ,
> startdato date,
> slutdato date,
> dagskema varchar(50),
> primary key (globalafvigelse)
> );
You're misusing the PRIMARY KEY constraint; you're supposed to give it a
list of attributes which function as the primary key for the table. I'm
surprised that was accepted at all. I think what you want is:
create table globalafvigelse
(
id serial,
...
primary key (serial)
);
Geoff
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: [INTERFACES] MSAccess and primary keys
@ 1999-05-15 16:23 Michael J Davis <michael.j.davis@tvguide.com>
0 siblings, 0 replies; 4+ messages in thread
From: Michael J Davis @ 1999-05-15 16:23 UTC (permalink / raw)
To: 'leif@danmos.dk' <leif@danmos.dk>; pgsql-interfaces
Make sure the "Recognize Unique Indexes" flag is turned on in the PostgreSQL
ODBC driver.
-----Original Message-----
From: leif@danmos.dk [SMTP:leif@danmos.dk]
Sent: Saturday, May 15, 1999 2:35 AM
To: pgsql-interfaces@postgreSQL.org
Subject: [INTERFACES] MSAccess and primary keys
[Sorry for reposting this, the subject got garbled.]
Hello,
I have a rather anoying problem. I am linking a quite large
M$Access application to a PostgreSQL database with a a lot of
relations (primary keys/foreign keys). In all my tables I have
created primary keys (to keep M$Access happy ;-). Unfortunately,
when I link my application to the database, Access asks me for
each and every table (there are more than 80 of them) what I
want to use for unique index field. I thought the primary key
spec would do just that?
All tables are designed like the one below:
create table globalafvigelse
(
id serial ,
startdato date,
slutdato date,
dagskema varchar(50),
primary key (globalafvigelse)
);
Greetings,
Leif
(leif@danmos.dk)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] MSAccess and primary keys
@ 1999-05-16 05:54 Ole Gjerde <gjerde@icebox.org>
parent: Geoffrey C. Speicher <geoff@sirius.trassociates.com>
0 siblings, 0 replies; 4+ messages in thread
From: Ole Gjerde @ 1999-05-16 05:54 UTC (permalink / raw)
To: Geoffrey C. Speicher <geoff@sirius.trassociates.com>; +Cc: pgsql-interfaces
On Sat, 15 May 1999, Geoffrey C. Speicher wrote:
> You're misusing the PRIMARY KEY constraint; you're supposed to give it a
> list of attributes which function as the primary key for the table. I'm
> surprised that was accepted at all. I think what you want is:
> create table globalafvigelse
> (
> id serial,
> ...
> primary key (serial)
> );
primary key(id) you mean? :)
The serial datatype automatically makes the field a primary key, so that
would be unnecessary anyway.
Ole Gjerde
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~1999-05-16 05:54 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-15 08:34 [INTERFACES] MSAccess and primary keys leif@danmos.dk
1999-05-15 13:19 ` Geoffrey C. Speicher <geoff@sirius.trassociates.com>
1999-05-16 05:54 ` Ole Gjerde <gjerde@icebox.org>
1999-05-15 16:23 RE: [INTERFACES] MSAccess and primary keys Michael J Davis <michael.j.davis@tvguide.com>
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