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
- Carolyn, MSI Team Dev Lead. You can get other Carolyn insights about developing for Windows Installer from the Windows Installer Chat Archives
[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.