Page 1 of 1

How to: updating VIEWS

Posted: Mon 15 Nov 2004 09:20
by GC
Updating VIEWS with SDAC at first seems impossible, but actually is a very easy task.
The problem with updating views comes from OLEDB and is not an issue only of SDAC.

The Solution is to simply create the view with VIEW_METADATA like this:

CREATE VIEW vXXX WITH VIEW_METADATA AS
select * from XXX where ....

After doing this you can simply use this view in a query like an ordinary table and it can be updated. For more information on updateable views check the SQL Books online.
Happy coding :)

Re: How to: updating VIEWS

Posted: Tue 16 Nov 2004 09:14
by Ikar
We are planning to add support of updating VIEWs to SDAC but not at the nearest version.

Posted: Tue 16 Nov 2004 12:48
by GC
The above method works just fine :)

Re: How to: updating VIEWS

Posted: Thu 29 May 2008 10:42
by JeePeeTee
Its now half-way 2008. Any plans so far to support updateable views within SDAC?
GC wrote:Updating VIEWS with SDAC at first seems impossible, but actually is a very easy task.
The problem with updating views comes from OLEDB and is not an issue only of SDAC.

The Solution is to simply create the view with VIEW_METADATA like this:

CREATE VIEW vXXX WITH VIEW_METADATA AS
select * from XXX where ....

After doing this you can simply use this view in a query like an ordinary table and it can be updated. For more information on updateable views check the SQL Books online.
Happy coding :)