cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
fishyj
Pilgrim

Msi.Install.ActiveDatabase.OpenExecute(sql);

Hello,

I'm trying to find out how I can populate a ListBox using the results from a managed custom action (C#).

I have found OpenView & OpenExecute, but I'm having problems with the SQL syntax.

Below is a brief code snippet....

string[] aStr = svrs.Split(',');
string sql = "DELETE FROM ListBox WHERE Property = 'GENERIC_LIST_ITEM'";
install.ActiveDatabase.OpenExecute(sql);
int idx = 0;
foreach (string s in aStr)
{
idx++;
sql = "INSERT ListBox (Property, Order, Value, Text) VALUES ('GENERIC_LIST_ITEM', idx, s, s)";
install.ActiveDatabase.OpenExecute(sql);
}


Looking at the MSI log I think the custom action aborts part way through, but I only know this as earlier logs (before using OpenExecute) have information in them that is now missing.
Labels (1)
0 Kudos
2 Replies
fishyj
Pilgrim

:nudge: Any one got any suggestions?

:nudge: Any one got any suggestions?
0 Kudos
fishyj
Pilgrim

Anyone know the answer to this? :confused:

Anyone know the answer to this? :confused:
0 Kudos