This topic is locked

Update View Problem

7/31/2006 6:15:56 PM
ASPRunnerPro General questions
S
shasta247 author

Hi, I am running ASP Runner 4.0 (Build 98) and I am trying to add an edit page for a view that I created on our SQL 2000 server. When I try to update the data via the edit page I get the error
"ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/movies/vPriority_edit.asp, line 416

"
Does anyone have any idea how to fix this?
Thank you,
Shasta247

J
jeyoung 7/31/2006

Update data
There are some restrictions for updating data through a view.
A view cannot modify more than one table.

So if a view is based on two or more tables, and you try to run a DELETE statement, it will fail.

If you run an UPDATE or INSERT statement, all columns referenced in the statement must belong to the same table.
It's not possible to update, insert or delete data in a view with a DISTINCT clause.
You cannot update, insert or delete data in a view that is using GROUP BY.
It's not possible to update, insert or delete data in a view that contains calculated columns.
Also be aware of columns that cannot contain NULL. If it has no default value, and is not referenced in the view, you will not be able to update the column.
Hope this helps!

Julian

C
clig 11/26/2006

Update data

There are some restrictions for updating data through a view.
A view cannot modify more than one table.

So if a view is based on two or more tables, and you try to run a DELETE statement, it will fail.

If you run an UPDATE or INSERT statement, all columns referenced in the statement must belong to the same table.
It's not possible to update, insert or delete data in a view with a DISTINCT clause.
You cannot update, insert or delete data in a view that is using GROUP BY.
It's not possible to update, insert or delete data in a view that contains calculated columns.
Also be aware of columns that cannot contain NULL. If it has no default value, and is not referenced in the view, you will not be able to update the column.
Hope this helps!

Julian


A TOP may also cause issues - usually included by default when a sort is added to the view...