This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Read Sql Dialog
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2008
03:04 AM
Read Sql Dialog
Hi,
I have to read sqlserver ip address,user id and password from Installshield dialog.
Can some one help me how to get the values data from sqlserver dialog box?
Regards,
sagar
I have to read sqlserver ip address,user id and password from Installshield dialog.
Can some one help me how to get the values data from sqlserver dialog box?
Regards,
sagar
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2008
08:52 AM
sagarvt wrote:
Hi,
I have to read sqlserver ip address,user id and password from Installshield dialog.
Can some one help me how to get the values data from sqlserver dialog box?
Regards,
sagar
You can retrieve those values from the Property Table using MsiGetProperty. The properties to check are IS_SQLSERVER_SERVER, IS_SQLSERVER_USERNAME, and IS_SQLSERVER_PASSWORD.
Here is some sample code
#include "ifx.h"
STRING strSQLServer, strSQLUser, strSQLPass;
NUMBER nvSize;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_SERVER", strSQLSRVR, nvSize );
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_USERNAME", strSQLUser, nvSize );
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_PASSWORD", strSQLPass, nvSize );
Hope this helps,
TP
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 21, 2008
05:56 AM
I also needed the same functionality i.e. getting the credentials from the SQL dialog and saving it into a config file. The code snippet u've provided is not compiling. Can u plz elaborate how to use it
Thnks in advance.
Thnks in advance.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 22, 2008
03:27 AM
I also needed the same functionality. But I would like to know how to do this in MSI project. My complete requirement is I need to get the server name and database name data from the user during installation and update the connection string in the registry and as well as in the supplied xml files.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2008
06:58 PM
ayub_yousuf wrote:
I also needed the same functionality i.e. getting the credentials from the SQL dialog and saving it into a config file. The code snippet u've provided is not compiling. Can u plz elaborate how to use it
Thnks in advance.
Hi,
USe OnSALLogin method from Installscript.
szServer,szUser,szPassword values gets automatically populated with values of server,user and password , after you enter the values in sql dialog box
save the details to ini file as
szSectionName = "sample";
szKeyName = "server";
inifile = "c:\test.ini";
AddProfString(inifile,szSectionName,"server",szServer);
AddProfString(inifile,szSectionName,"admin",szUser);
AddProfString(inifile,szSectionName,"password",szPassword);