2
votes

I'm trying to use the Edit Control within an Dialog. When I use this Control I always get an error. The error code is 2228.

if I use a different control(Text) it works!

here is my code:

<UI Id="myUI">
  <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
  <Dialog Id="myDlg" Height="400" Width="550" Title="Uninstall Sample UI">
    <Control Id="myEdit" Type="Edit" Property="USER_NAME" Height="17" Width="100" X="50" Y="50" />
  </Dialog>
</UI>
</Fragment>

And I also have a Reference to WixUIExtension.dll

1

1 Answers

1
votes

Error 2228 is shown because the control is not defined correctly, resulting in an incorrect query for the MSI database.

Try setting the Indirect and Text attributes:

<Control Id="myEdit" Type="Edit" Property="USER_NAME" Height="17" Width="100" X="50" Y="50" Indirect="yes" Text="[USER_NAME]"/>

This way the editbox value is handled by its property.