problems with non-editable view (ADP/Access2003)

G

Gerald Aichholzer

Hi NG,

I have a strange problem with a (non) editable view.
There's a table Etat which looks like:

CREATE TABLE [dbo].[Etat] (
[fiEtat] [int] NOT NULL ,
[Year] [smallint] NOT NULL ,
[Cost] [decimal](12, 2) NOT NULL ,
[TS] [timestamp] NULL
) ON [PRIMARY]

Primary key is composed from fiEtat and Year.

Then I have an editable view 'viewEtatCost' with the
following SQL:

SELECT TOP 100 PERCENT fiEtat, Jahr, Betrag
FROM dbo.EtatBetrag
ORDER BY Jahr

And a non-editable view 'viewCustomerEtatCostForm':

SELECT fiEtat, Jahr, Betrag
FROM dbo.viewEtatBetrag


Can anybody tell me why the second view is read-only?

thanx in advance,
Gerald
 
S

Sylvain Lafontaine

Try adding the « TOP 100 PERCENT » to your second view, it may help. There
is a reason behind this but I don't remember it.

Also, mixing composed primary keys and ADP is probably not the best idea of
the century.

S. L.
 
S

Sylvain Lafontaine

There is also a relation between the TOP 100 PERCENT and the use of a ORDER
BY clause in a view but I don't remember it either.

S. L.

Sylvain Lafontaine said:
Try adding the « TOP 100 PERCENT » to your second view, it may help.
There is a reason behind this but I don't remember it.

Also, mixing composed primary keys and ADP is probably not the best idea
of the century.

S. L.

Gerald Aichholzer said:
Hi NG,

I have a strange problem with a (non) editable view.
There's a table Etat which looks like:

CREATE TABLE [dbo].[Etat] (
[fiEtat] [int] NOT NULL ,
[Year] [smallint] NOT NULL ,
[Cost] [decimal](12, 2) NOT NULL ,
[TS] [timestamp] NULL
) ON [PRIMARY]

Primary key is composed from fiEtat and Year.

Then I have an editable view 'viewEtatCost' with the
following SQL:

SELECT TOP 100 PERCENT fiEtat, Jahr, Betrag
FROM dbo.EtatBetrag
ORDER BY Jahr

And a non-editable view 'viewCustomerEtatCostForm':

SELECT fiEtat, Jahr, Betrag
FROM dbo.viewEtatBetrag


Can anybody tell me why the second view is read-only?

thanx in advance,
Gerald
 
G

Gerald Aichholzer

Sylvain said:
There is also a relation between the TOP 100 PERCENT and the use of a ORDER
BY clause in a view but I don't remember it either.

The relation is that you must use TOP 100 PERCENT if
your query contains ORDER BY.

Gerald
 
G

Gerald Aichholzer

Sylvain said:
Try adding the « TOP 100 PERCENT » to your second view, it may help. There
is a reason behind this but I don't remember it.

Hi Sylvain,

it didn't work, but I have solved the problem: I just don't
use nested views in this case ;)

thanx,
Gerald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top