Bug with combos - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Bug with combos

Hey guys,

I have been going around in circles all day trying to sort this one.

I did this before in an earlier version of AI and it worked, not in 5.1.1 though.

I have a combo box on a dialogue that I want to fill.

I copied the basic example from this forum and created the .vbs

Here is the code

Set db = Session.Database
Dim SQLCmd, index

For index = 0 to 2
SQLCmd = "INSERT INTO FolderDlgComboBox_313 ( Property, Order, Value, Text)"
SQLCmd = SQLCmd & " VALUES ('FOLDERDLGCOMBOBOX_313_PROP','" & index & "','Test','"
SQLCmd = SQLCmd & index & "') TEMPORARY"
Set view = db.OpenView( SQLCmd )
view.Execute
view.Close
Next


I added the .vbs to the project files
Created a new UI Custom action with no Method
Went to the dialogue previous to the dialogue with my combo and added a published doAction with the Arugment pointing to my .vbs to the Next button.

This is what I get

MSI (c) (E8:90) [16:27:06:791]: Note: 1: 2205 2: 3: FolderDlgComboBox_313
MSI (c) (E8:90) [16:27:06:807]: Note: 1: 2228 2: 3: FolderDlgComboBox_313 4: INSERT INTO FolderDlgComboBox_313 ( Property, Order, Value, Text) VALUES ('FOLDERDLGCOMBOBOX_313_PROP','0','Test','0') TEMPORARY
Action ended 16:27:06: standard_combo.vbs. Return value 3.
DEBUG: Error 2896: Executing action standard_combo.vbs failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: standard_combo.vbs, ,
Action ended 16:27:06: WelcomeDlg. Return value 3.
MSI (c) (E8:90) [16:27:06:932]: Doing action: FatalError
Action 16:27:06: FatalError.
Action start 16:27:06: FatalError.
DEBUG: Error 2826: Control BottomLine on dialog FatalError extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalError, BottomLine, to the right
Action 16:27:07: FatalError. Dialog created

I have tried a lot of variations with the vb code, dialogues and even seperate projects, all still give the same result.

I think it has to be a bug.

Thanks

Tony[/list]
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Tony,

The problem is with the script you are using. It is not correct. Here is the script you should use:

Code: Select all

Set db = Session.Database

For index = 0 to 2
    itemValue = "Test" & index
    itemText = itemValue
    SQLCmd = "INSERT INTO `ComboBox` (`Property`,`Order`,`Value`,`Text`)"
    SQLCmd = SQLCmd & " VALUES ('FOLDERDLGCOMBOBOX_313_PROP','" &  index & "','"
    SQLCmd = SQLCmd & itemValue & "','" & itemText & "') TEMPORARY"     
    Set view = db.OpenView( SQLCmd )
    view.Execute
    view.Close
Next
Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
splay
Posts: 58
Joined: Tue May 15, 2007 6:09 pm

Combo Box

My mistake Gigi thanks,

I thought the ComboBox had to be replaced with the actual combo box name.


Thats great though, thanks again for your help.

Tony

Return to “Common Problems”