Microsoft KB Archive/174640: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
<div id="TitleRow"> | <div id="TitleRow"> | ||
= <span id="KB174640"></span>PRB: ASP Error | = <span id="KB174640"></span>PRB: ASP Error "The Query Is Not Updateable" When You Update Table Record = | ||
Line 76: | Line 76: | ||
Microsoft OLE DB Provider for ODBC Drivers error '80004005'<br /> | Microsoft OLE DB Provider for ODBC Drivers error '80004005'<br /> | ||
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name<br /> | [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name<br /> | ||
' | '<a column from your table>'.<br /> | ||
/ | /<your asp file>.asp, line xxx | ||
</div> | </div> | ||
Line 119: | Line 119: | ||
== RESOLUTION == | == RESOLUTION == | ||
Process one table's fields independently from another. Issue an Update after each table's fields have been modified. For example, in the code sample below, the | Process one table's fields independently from another. Issue an Update after each table's fields have been modified. For example, in the code sample below, the "cmdTemp.CommandText" property holds the one-to-many query and the fields of parent table are updated independently of the child table. | ||
<pre class="codesample"> | <pre class="codesample"> <Object creation code removed for clarity> | ||
. | . | ||
. | . | ||
. | . | ||
cmdTemp.CommandText = | cmdTemp.CommandText = "SELECT stores.state, sales.qty FROM sales INNER | ||
JOIN stores ON sales.stor_id = stores.stor_id | JOIN stores ON sales.stor_id = stores.stor_id" | ||
. | . | ||
. | . | ||
. | . | ||
'update parent table first | 'update parent table first | ||
Datacommand1( | Datacommand1("state")="WA" | ||
Datacommand1.update | Datacommand1.update | ||
'now update child table | 'now update child table | ||
Datacommand1( | Datacommand1("qty")=4 | ||
Datacommand1.update | Datacommand1.update | ||
</pre> | </pre> |
Latest revision as of 11:07, 21 July 2020
Article ID: 174640
Article Last Modified on 5/2/2006
APPLIES TO
- Microsoft Active Server Pages 4.0
- Microsoft Visual InterDev 1.0 Standard Edition
- Microsoft Visual InterDev 6.0 Standard Edition
- Microsoft ActiveX Data Objects 2.0
- Microsoft ActiveX Data Objects 2.1 Service Pack 2
- Microsoft ActiveX Data Objects 2.5
- Microsoft ActiveX Data Objects 2.6
- Microsoft ActiveX Data Objects 2.7
- Microsoft Internet Information Server 4.0
- Microsoft Internet Information Services 5.0
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
This article was previously published under Q174640
SYMPTOMS
One of the following errors occurs when you update a table record from an Active Server Pages (ASP) page through ADO's Recordset.update method:
-OR-
-OR-
-OR-
CAUSE
The following conditions cause this error to occur:
- You have created a query that contains more than one table.
- You are updating the records returned by this query and the update affects fields in more than one table.
Basically, if the query involves tables that have a one-to-many relationship, the query -as a whole- is not updateable.
RESOLUTION
Process one table's fields independently from another. Issue an Update after each table's fields have been modified. For example, in the code sample below, the "cmdTemp.CommandText" property holds the one-to-many query and the fields of parent table are updated independently of the child table.
<Object creation code removed for clarity> . . . cmdTemp.CommandText = "SELECT stores.state, sales.qty FROM sales INNER JOIN stores ON sales.stor_id = stores.stor_id" . . . 'update parent table first Datacommand1("state")="WA" Datacommand1.update 'now update child table Datacommand1("qty")=4 Datacommand1.update
STATUS
This behavior is by design.
REFERENCES
For the latest Knowledge Base artices and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:
Keywords: kberrmsg kbdatabase kbaspobj kbprb KB174640