- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Can't fill combobox from Managed Custom Action
- 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
Can't fill combobox from Managed Custom Action
Hi.
I'm getting errors when trying to add items to a combobox from custom action. I'm using InstallShield.Interop.Msi.
Getting Error/Exception "MsiException: 1629 (Error.DatatypeMismatch)" for the following code:
Msi.Database db = GetInstallDatabase ();
Msi.View view = db.OpenView ( $"SELECT * FROM ComboBox WHERE Property='{comboBoxProperty}'" );
//view.Execute ();
Msi.Record entry = new(4);
int index = 0;
foreach ( Tuple<string, string> textAndValue in textsAndValues )
{
entry.SetString ( 1, comboBoxProperty );
entry.SetInteger ( 2, ++index );
entry.SetString ( 3, textAndValue.Item2 );
entry.SetString ( 4, textAndValue.Item1 );
view.Modify ( Msi.ModifyMode.InsertTemporary, entry );
}
When I do not comment out the view.Execute(); call the I get the exception "MsiException: 1627 (Error.FunctionFailed) "1: 2259 2: 3: 4: "".
Both are thrown from view.Modify call.
comboBoxProperty is set to "_InstalledVersion"
textAndValue.Item2 = "D:\Program Files\xxx\Test_1.5.0.0"
textAndValue.Item1= "1.5.0.0"