This website uses cookies. By clicking Accept, 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
- :
- :nudge: Any one got any suggestions?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- 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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 31, 2013
06:24 AM
:nudge: Any one got any suggestions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 01, 2013
07:41 AM
Anyone know the answer to this? :confused:
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)