I am trying to update the value of a property, thru code.
I have a code (VB Script) that can update the Property table in any MSI file.
Now, when i wrote the same code in C++ it does not work

The code flow is:
1. MsiOpenDatabase [open msiDB in MSIDBOPEN_DIRECT mode]
2. MsiDatabaseOpenView [query is "SELECT * FROM `Property` WHERE `Property` = 'MYPROP'"]
3. MsiViewExecute
4. MsiViewFetch
5. MsiRecordSetString [MsiRecordSetString ( record_handle, 2/*field to set*/, "new_value" );]
6. MsiViewModify [MSIMODIFY_UPDATE mode]
7. MsiCloseHandle [for Record & View]
8. MsiDatabaseCommit [for msiDB]
9. MsiCloseHandle [for msiDB]
Can you tell what's going wrong ?