Thread: Views and Access 2000

Views and Access 2000

From
Nick Haw
Date:
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?

Re: Views and Access 2000

From
"Henshall, Stuart - WCP"
Date:
<p><font size="2">Hello,</font><br />        <font size="2">If you create a table with suitable fields, including a
primarykey</font><br /><font size="2">and then use a select rule this will do it.</font><br /><font
size="2">hth,</font><br/><font size="2">- Stuart</font><p><font size="2">-----Original Message-----</font><br /><font
size="2">From:Nick Haw [<a href="mailto:nick.haw@operagrp.com">mailto:nick.haw@operagrp.com</a>]</font><br /><font
size="2">Sent:12 June 2002 16:46</font><br /><font size="2">To: 'pgsql-interfaces@postgresql.org'</font><br /><font
size="2">Subject:Views and Access 2000</font><br /><p><font size="2">OK, i have some views that I need people to be
ableto use in Access 2000. When I try an link them using my ODBC data source I always get a dialogue box which says
"selectunique record identifier" even though the table the view is using has got a primary key. I don't want this box
toappear, is there anyway I can stop it?</font> 

Re: Views and Access 2000

From
Nick Haw
Date:
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@westcountrypublications.co.uk]
Sent: 18 June 2002 12:31
To: Nick Haw; 'pgsql-interfaces@postgresql.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.haw@operagrp.com]
Sent: 12 June 2002 16:46
To: 'pgsql-interfaces@postgresql.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?

Re: Views and Access 2000

From
"Henshall, Stuart - WCP"
Date:
<p><font size="2">Hi,</font><br /><font size="2">    a quick example should clarify:</font><br /><font size="2">CREATE
TABLEtbl_a (pk serial,t text,a int4,PRIMARY KEY (pk));</font><br /><font size="2">CREATE VIEW vw_a SELECT pk,t FROM
tbl_a;</font><br/><font size="2">To do the equivalent view you would:</font><br /><font size="2">CREATE TABLE vw_a (pk
int4,ttext,PRIMARY KEY (pk));</font><br /><font size="2">CREATE RULE "_RETvw_a" AS ON SELECT TO vw_a DO INSTEAD SELECT
pk,tFROM tbl_a;</font><br /><font size="2">This is untested, but something like this should work</font><br /><font
size="2">-Stuart</font><p><font size="2">-----Original Message-----</font><br /><font size="2">From: Nick Haw [<a
href="mailto:nick.haw@operagrp.com">mailto:nick.haw@operagrp.com</a>]</font><p><fontsize="2">Thanks for the reply, but
justto 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
asthe 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
complicatingthis?</font><p><font size="2"> </font><br /><font size="2">Many Thanks</font><br /><font
size="2"> </font><br/><font size="2">Nick Haw</font><br /><font size="2">-----Original Message-----</font><br /><font
size="2">From:Henshall, Stuart - WCP [<a
href="mailto:SHenshall@westcountrypublications.co.uk">mailto:SHenshall@westcountrypublications.co.uk</a>]</font><br
/><fontsize="2">Sent: 18 June 2002 12:31</font><br /><font size="2">To: Nick Haw;
'pgsql-interfaces@postgresql.org'</font><br/><font size="2">Subject: RE: Views and Access 2000</font><br /><p><font
size="2">Hello,</font><br /><font size="2">        If you create a table with suitable fields, including a primary key
</font><br/><font size="2">and then use a select rule this will do it. </font><br /><font size="2">hth, </font><br
/><fontsize="2">- Stuart </font><br /><font size="2">-----Original Message----- </font><br /><font size="2">From: Nick
Haw[<a href="mailto:nick.haw@operagrp.com">mailto:nick.haw@operagrp.com</a>] </font><br /><font size="2">Sent: 12 June
200216:46 </font><br /><font size="2">To: 'pgsql-interfaces@postgresql.org' </font><br /><font size="2">Subject: Views
andAccess 2000 </font><br /><p><font size="2">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
anywayI can stop it?</font>