Page 1 of 1

How to: Load Combobox from sql "select" command

Posted: Thu Aug 25, 2011 3:57 am
by leos58
Hi,
I've a problem with the loading of a combobox in a dialog installaware.
My problem is that I tried to load the item of the combo with the result of a select command sql.
I tried to use the installaware command "MS SQL Server" in this mode:

~InstallAware Clipboard Data~
~MS SQL Server~
~{7B3760E7-D729-4032-AC09-EC59E8CF08A4}~
~$SERVER$,$ISTANCE$,$DB$,$USER$,$PWD$,EDS,"SELECT [Field] FROM [Dbl].[dbo].[Table]$NEWLINE$GO",0,0~
~mMSSQLIDE.dll\mMSSQLExec.dll~

And then I've modified the items property of combo with $EDS$.
But the result of the variables is "SUCCESS" and not the result of the select command.
WHY?
Any help will be appreciated.Thanks.
Bye

Re: How to: Load Combobox from sql "select" command

Posted: Thu Aug 25, 2011 8:44 am
by giaviv
Hi,

The SQL command does not return SQL values - it just executes the script and returns whether or not it succeeded.

Re: How to: Load Combobox from sql "select" command

Posted: Thu Aug 25, 2011 9:03 am
by leos58
Thanks for your reply.
I imagined that It wasn't possible but i wanted be sure.
But is there any alternative to load a combo dinamically or not???
Thanks again.
Bye

Re: How to: Load Combobox from sql "select" command

Posted: Thu Aug 25, 2011 10:33 am
by giaviv
You can definitely load a combo dynamically - just make sure you separate the values with NEWLINE, like so:

Item1$NEWLINE$Item2$NEWLINE$Item3