cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Guido_Herrling
Level 3

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"

Labels (1)
0 Kudos
0 Replies