Partager via


Any tips on troubleshooting Error 2259: Database: foo.msi Table(s) Update failed

Question

Any tips on troubleshooting Error 2259: Database: foo.msi Table(s) Update failed?

What column in the update is causing the update to fail?

UPDATE ControlCondition SET ControlCondition.Condition = '1' WHERE ControlCondition.Dialog_='FolderForm' AND ControlCondition.Control_='AllUsersRadioGroup' AND ControlCondition.Action='Hide'

Based on orca, and reading the ms.chm, this command should work but instead

 Msi API Error 80004005: Execute,Params

1: 2259 2: foo.msi 3:  4:  

Answer

You're trying to update a primary key column. You can't do that with an update. You have to delete the existing row and then add a new row.

See SQL syntax Windows Installer MSDN topic:

Modify existing records in a table UPDATE {table-list} SET {column}= {constant} [, {column}= {constant}][, ...] [WHERE {operation-list}] UPDATE queries only work on nonprimary key columns.

See ControlCondition Table Windows Installer MSDN topic:

The ControlCondition table has the following columns.

Column Type Key Nullable
Dialog_ Identifier Y N
Control_ Identifier Y N
Action Text Y N
Condition Condition Y N

Content credit also belongs to

[Author: Robert Flaming]

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.

Comments

  • Anonymous
    August 30, 2005
    I will delete the row and insert again. This is ok for normal case.
    I have one problem on inserting this data to condition column.'REMOVE=""'
    I use wnrunsql.vbs for inserting. my problem is - "" (double quotes is not show in orca).
    How can I solve this problem?

  • Anonymous
    September 07, 2005
    i was not able to update the Display Column (it is not a primary key) of the feature table from vb script and it gave me the same 2259 error