This website uses cookies. By clicking OK, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Msi.Install.ActiveDatabase.OpenExecute(sql);
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
fishyj
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Oct 28, 2013
11:44 AM
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.
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.
2 Replies