Hello,
I am working on a custom dialog to display a list of the settings that
the user has selected so that they can check them, and go back if necessary,
before they click on Install to begin the actual installation.
I have got a Custom Action written in InstallScript that determines the
current settings and then calls another function to do the insert.

---SNIP---
function ListBoxInsert(hMSI, sProperty, nIndex, sText)
STRING sTemp, sQuery;
NUMBER nResult, hDatabase, hView;
begin
NumToStr(sTemp, nIndex);

sQuery = "INSERT INTO ListBox (Property, `Order`, Value, Text) VALUES
('" +
sProperty + "', " + sTemp + ", '" + sTemp + "', '" + sText + "')";

hDatabase = MsiGetActiveDatabase(hMSI);
nResult = MsiDatabaseOpenView(hDatabase, sQuery, hView);
if (nResult = ERROR_SUCCESS) then
nResult = MsiViewExecute(hView, NULL);
MsiCloseHandle(hView);
nResult = MsiDatabaseCommit(hDatabase);
endif;
MsiCloseHandle(hDatabase);

return nResult;
end;
---SNIP---

This seems to be OK, but at runtime it does not put any data into the
ListBox table. Instead the call to MsiViewExecute() returns error numner
1627.

The Custom Action function that uses the above function is called by the
previous dialog to the one containing the relevant ListBox object, in the
"Next" button's event list, before the NewDialog call. The ordering is
correct (I have checked with ORCA).

Does anyone know what the problem is? Is it a) a problem with my code,
or b) a Windows Installer problem. I am using ISWI 1.10.

TIA

Simon..