cancel
Showing results for 
Search instead for 
Did you mean: 
vasanthakumarmk
Flexera beginner

How to add one more dropdown list in SQLServerSelect dialog

Jump to solution
Hello All, I am very new to InstallShield, my requirement is like to add one more dropdown control along with 'SQLServerSelect' (This dialog already have one dropdown control which listed all available Database Servers). I need to add one more dropdown which need to list all available database names. I have used 'SQLRTGetDatabases' to get all available databases in the list. I need to show that list in the dropdown control on the 'SQLServerSelect' dialog. Can anyone please explain how to implement this?
0 Kudos
2 Solutions

Accepted Solutions
Flexera Jenifer
Flexera

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution

Hi @vasanthakumarmk,

Below would be the sample snippet that could help you with:

//populate servers list listServers = SQLRTGetServers( TRUE );//Replace with your function call

if(svServer = "" ) then

ListGetFirstString( listServers, svServer );

endif;

CtrlSetList( DLG_SQLSELECT, COMBO_SERVERS, listServers );

CtrlSetText( DLG_SQLSELECT, COMBO_SERVERS, svServer );

ListDestroy( listServers );

hDlg = CmdGetHwndDlg(DLG_SQLSELECT);

SdGeneralInit(DLG_SQLSELECT, hDlg, 0, szSdProduct);

szTitle = GetDialogTitle(DLG_ASK_TEXT);

SdSetDlgTitle(DLG_SQLSELECT, hDlg, szTitle);

if(szMsg != "") then

CtrlSetText(DLG_SQLSELECT, SD_STA_MSG, szMsg);

endif;

 

The sample script file of SQLServerSelect dialog you could find on \\Script\isrt\Src\SQLServerSelectDlg.rul .You can play around with the same script file by replacing with your functions.

Hope it helps,

Thanks,

Jenifer

View solution in original post

0 Kudos
Flexera Jenifer
Flexera

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution

Hi @vasanthakumarmk ,

 

Glad that you could get things working.

CtrlSetText( DLG_SQLSELECT, COMBO_SERVERS, svServer );

doesn't help with setting default value before calling your function or whenever needed?

 

Thanks,

Jenifer

View solution in original post

0 Kudos
7 Replies
Flexera banna_k
Flexera

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution
0 Kudos
vasanthakumarmk
Flexera beginner

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution
Thanks for your reference link. Do you have any direct example code base?
0 Kudos
Flexera Jenifer
Flexera

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution

Hi @vasanthakumarmk,

Below would be the sample snippet that could help you with:

//populate servers list listServers = SQLRTGetServers( TRUE );//Replace with your function call

if(svServer = "" ) then

ListGetFirstString( listServers, svServer );

endif;

CtrlSetList( DLG_SQLSELECT, COMBO_SERVERS, listServers );

CtrlSetText( DLG_SQLSELECT, COMBO_SERVERS, svServer );

ListDestroy( listServers );

hDlg = CmdGetHwndDlg(DLG_SQLSELECT);

SdGeneralInit(DLG_SQLSELECT, hDlg, 0, szSdProduct);

szTitle = GetDialogTitle(DLG_ASK_TEXT);

SdSetDlgTitle(DLG_SQLSELECT, hDlg, szTitle);

if(szMsg != "") then

CtrlSetText(DLG_SQLSELECT, SD_STA_MSG, szMsg);

endif;

 

The sample script file of SQLServerSelect dialog you could find on \\Script\isrt\Src\SQLServerSelectDlg.rul .You can play around with the same script file by replacing with your functions.

Hope it helps,

Thanks,

Jenifer

View solution in original post

0 Kudos
vasanthakumarmk
Flexera beginner

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution

Hi Jenifer,

Thank you so much for your help. Really appreciate your help. Its working now.

One more small doubt -> How do I have one default value in combobox ?

Regards,
Vasanth

0 Kudos
vasanthakumarmk
Flexera beginner

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution
Thank you Jenifer, Thanks a lot for your help.
One more small doubt -> How do I have one default value in combobox ?
0 Kudos
Flexera Jenifer
Flexera

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution

Hi @vasanthakumarmk ,

 

Glad that you could get things working.

CtrlSetText( DLG_SQLSELECT, COMBO_SERVERS, svServer );

doesn't help with setting default value before calling your function or whenever needed?

 

Thanks,

Jenifer

View solution in original post

0 Kudos
vasanthakumarmk
Flexera beginner

Re: How to add one more dropdown list in SQLServerSelect dialog

Jump to solution
Thank you... Its working.....
0 Kudos