Hi All,
I' am using Listbox in my dialog.
ListBox contains same items as in CustomSetup componets (show list of features). It's work fine until I come back to CustomSetup and change one of features state. I've got error 2878 from my dialog.
I think i need remove all old Items from ListBox before I fill it second time. But I don't know how.
Please help.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
How remove items from ListBox
Started by
Kiril
, Aug 14 2001 11:42
3 replies to this topic
Posted 14 August 2001 - 14:10
I solved problem with custom action when I call on back button:
hDatabase = MsiGetActiveDatabase(hMSI);
sQuery = "SELECT * FROM ListBox WHERE Property='AUTHMETHODSLIST'";
MsiDatabaseOpenView(hDatabase, sQuery, hView);
nResult = MsiViewExecute(hView, NULL);
nResult = MsiViewFetch(hView, hRecord);
while(nResult = ERROR_SUCCESS)
MsiViewModify(hView, MSIMODIFY_DELETE, hRecord);
nResult = MsiViewFetch(hView, hRecord);
endwhile;
hDatabase = MsiGetActiveDatabase(hMSI);
sQuery = "SELECT * FROM ListBox WHERE Property='AUTHMETHODSLIST'";
MsiDatabaseOpenView(hDatabase, sQuery, hView);
nResult = MsiViewExecute(hView, NULL);
nResult = MsiViewFetch(hView, hRecord);
while(nResult = ERROR_SUCCESS)
MsiViewModify(hView, MSIMODIFY_DELETE, hRecord);
nResult = MsiViewFetch(hView, hRecord);
endwhile;
Posted 15 August 2001 - 10:39
Why not
hDatabase = MsiGetActiveDatabase(hMSI);
sQuery = "DELETE * FROM ListBox WHERE Property='AUTHMETHODSLIST'";
MsiDatabaseOpenView(hDatabase, sQuery, hView);
MsiViewExecute(hView, NULL);
MsiViewClose(hView);