Re: Views and Access 2000

From: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
To: 'Nick Haw' <nick(dot)haw(at)operagrp(dot)com>, "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Views and Access 2000
Date: 2002-06-19 09:36:44
Message-ID: E2870D8CE1CCD311BAF50008C71EDE8E01F748F9@MAIL_EXCHANGE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,
a quick example should clarify:
CREATE TABLE tbl_a (pk serial,t text,a int4,PRIMARY KEY (pk));
CREATE VIEW vw_a SELECT pk,t FROM tbl_a;
To do the equivalent view you would:
CREATE TABLE vw_a (pk int4,t text,PRIMARY KEY (pk));
CREATE RULE "_RETvw_a" AS ON SELECT TO vw_a DO INSTEAD SELECT pk,t FROM
tbl_a;
This is untested, but something like this should work
- Stuart

-----Original Message-----
From: Nick Haw [mailto:nick(dot)haw(at)operagrp(dot)com]

Thanks for the reply, but just to clarify (sorry I'm a bit new to all this).
With the view I've got, do I create a table that is exactly the same as the
view, but with no data in it, and then use a rule on that table to bring the
data from the view? Or am I over complicating this?

Many Thanks

Nick Haw
-----Original Message-----
From: Henshall, Stuart - WCP
[mailto:SHenshall(at)westcountrypublications(dot)co(dot)uk]
Sent: 18 June 2002 12:31
To: Nick Haw; 'pgsql-interfaces(at)postgresql(dot)org'
Subject: RE: Views and Access 2000

Hello,
If you create a table with suitable fields, including a primary key
and then use a select rule this will do it.
hth,
- Stuart
-----Original Message-----
From: Nick Haw [mailto:nick(dot)haw(at)operagrp(dot)com]
Sent: 12 June 2002 16:46
To: 'pgsql-interfaces(at)postgresql(dot)org'
Subject: Views and Access 2000

OK, i have some views that I need people to be able to use in Access 2000.
When I try an link them using my ODBC data source I always get a dialogue
box which says "select unique record identifier" even though the table the
view is using has got a primary key. I don't want this box to appear, is
there anyway I can stop it?

Browse pgsql-interfaces by date

  From Date Subject
Next Message Iavor Raytchev 2002-06-20 14:06:38 pgaccess - current status
Previous Message Nick Haw 2002-06-19 09:25:36 Re: Views and Access 2000