PDA

View Full Version : What is required for SQLRT



ninlar
06-07-2004, 01:43 AM
I have tried multiple times from a multitude of new InstallScript MSI projects to get the SQL Login Server Select dialog to show up without success. I delete the random InstallWelcome dialog that gets added and corrupts the MSI tables. Then I added the IS_SQLSERVER_DIALOG. When OnSQLLogin is called it still fails to show the SQL dialog. These workarounds were suggested by InstallShield employees.

After reading other posts I tried to call the SQLRTInitialize function manually before the OnSQLLogin and added the SQLRT.dll as a support file to the project etc. I am still unable to get the dialog to show up.

Could someone from InstallShield please list out exactly what files are needed for this dialog to load and what functions must be called to properly initialize and load this dialog. I have the latest hotfixes applied and everything, and I cannot get this dialog to load.

Thanks for your time.

hidenori
06-07-2004, 03:19 PM
Please follow the steps below to get the SQLLogin Dialog appear:

1. Create a new InstallScript MSI project.
2. Go to SQL Servers view. Add a SQL connection.
3. Yes/No dialog for upgrading InstallWelcome.isd should be prompted. Click No.
4. Add a SQL script to the connection.
5. Go to Property Manager view. Add the IS_SQLSERVER_DIALOG property and set 0 to its value.
6. Build and run your release.

You can check the OnFirstUIBefore and OnSQLLogin function in the default Setup.rul to see how we display the dialog. Basically we evaluate the length of value of the IS_SQLSERVER_DIALOG property.

Hope this helps.
Hidenori Yamanishi
InstallShield Software Corp

Equanox
09-07-2004, 05:39 AM
hidenori,

staying with the same topic, could you please help me to execute scripts on different database servers.

for ex: I have 3 connections in the SQL Server view.

Con1---->Script1
Script2
Script3

Con2---->Script4
Script5
Script6

Con3---->Script7
Script8

I'm using InstallScript MSI Project.

I want to call SQLServerSelectLogin dialog three times for three connections.

Scripts from con1 should be executed in Con1 database server
Scripts from con2 should be executed in Con2 database server
Scripts from con3 should be executed in Con3 database server

I'm new to IS...could you plz throw some light on this.

I cannot use only InstallScript Project because I'm installing services, extracting COM etc. Hence I have to implement this in InstallScript MSI Project only.

TIA

Warm regards,
Equanox

ramkrishna27
10-18-2004, 02:42 AM
Did you get the result for that. I am also trying a similar installation package.

Equanox
10-19-2004, 01:39 AM
Mate,

I worked on it for while, then it was damn easy. Here is how it can be done:

1. Goto SQL Servers View and create the number of connections you want i.e. new connection for each set of SQL scripts that you want to be executed on a particular SQL server.

2. Then goto Property Manager. You will see that some public variables have already been created for you. Like IS_SQLSERVER_DIALOG, IS_SQLSERVER_SERVER and so on.

3. Edit these properties to suit your needs as you will be manipulating them in you InstallScript. i.e. give them relevant names to associate them with particular connection.

PS: Sometimes Public properties for all the connections will not be created for you automatically. In such cases, you will have to create your own. That should not be difficult, its easy. Just create like

IS_SQLSERVER_SERVER1
IS_SQLSERVER_USERNAME1
IS_SQLSERVER_PASSWORD1
IS_SQLSERVER_AUTHENTICATION1
IS_SQLSERVER_DIALOG1


IS_SQLSERVER_SERVER2
IS_SQLSERVER_USERNAME2
IS_SQLSERVER_PASSWORD2
IS_SQLSERVER_AUTHENTICATION2
IS_SQLSERVER_DIALOG2

IS_SQLSERVER_SERVER3
IS_SQLSERVER_USERNAME3
IS_SQLSERVER_PASSWORD3
IS_SQLSERVER_AUTHENTICATION3
IS_SQLSERVER_DIALOG3

You would want to name it properly for it to be easily accessible in the code.

For ex:

For the _DIALOG properties you would have to assign a value of 0 (mandatory).
For the _DATABASE properties you would have to assign a value of null.
You can assign any relevant values to other properties. These values will be treated as default values.

The scripts will be executed in the same order, as the order in which you have created the connections. So, make sure you have placed the SQL scripts in the right order in the right connection like placing the Create database script(if exists) as the first script in the first connection and then others will follow.

4. Now goto the Direct Editor and select the Table "ISSQLConnection" and verify that all the settings are right. i.e. right properties are assigned to their respective database connections.

5. Then call function SQLServerSelectLogin() for each connection with respective properties as its arguments. That should do the job for you.

Njoy ;)

Hope this helped you.

Warm regards,
Equanox

ramkrishna27
10-22-2004, 09:38 AM
:) Thanks Buddy,
It sounds great for me.

I am new to installshiled and the real challege for me is to create multiple databases based on the input from a dialog. There is going to be one script and all i have to do is run the sqlscript multiple times changing some of the values like database name in different server in a LAN setup.

I have to write scripts based on this and create dynamic sql connections. All you had said should be created at RUNTIME. If you have any suggestions i am here waiting to hear from you my friend.

Equanox
10-25-2004, 01:20 AM
Changing values of properties during the installation i.e. while setup is running is nothing but RUNTIME or dynamic manipulation right?

As far as I know Setting Properties is the way to go and New Properties cannot be created at runtime if I am right.

Properties can only be created during design time to be used at runtime.

You can do one thing. Create another set of properties for databases like

IS_SQLSERVER_DATABASE0,IS_SQLSERVER_DATABASE1....so on for each set of connections.

Create a custom dialog or alter the SQLServerSelectLoginDlg to accomodate a dropdown box to display the list of databases on the chosen SQLServer, during the validation, if the user chooses Next, assign the values to their respective properties.

Like

IS_SQLSERVER_SERVER1 = SQLServer1
IS_SQLSERVER_DATABASE1 = Northwind1
.
.
.
so on

If you are new to creating custom dialogs, just search for it in Developer 8 forums, you will get lot of very down to earth resources including sample codes.

Also to retrieve the list of Databases from the selected server, there must be lot of information on the developer 8 forum, had a link to it, can't find it right now, just search for it or you can write your own using VBScript.

Right now am quite busy, when I find sometime, will surely send the links once I find them. But also try to apply some effort. It is not that hard.


Good luck

Warm regards,
Equanox

tymberwyld
11-09-2004, 01:16 PM
Equanox,

Do you have any idea why I keep getting this Error?


Error Number: 0x80040702
Description: Failed to Load DLL: ISSQLSRV

Setup will now terminate


I don't know, but I think it has something to do with this. Everytime I add a new SQL Connection, I get all kinds of "Conflicts" that I have to resolve. I have to choose "Overwrite" and then I have to go fix whatever it messed up.

I can compile fine, but the SQL Function do not work whatsoever! I do have all the SQL Properties and also the SQLSRV.dll in my Binary Table! :confused:

Equanox
11-10-2004, 01:01 AM
Please read the reply from hidenori in this thread

nsivakumar
02-25-2005, 05:39 AM
Hi,

I am building an installshield MSI Project and facing the same issue while calling the SQLServerSelectLogin dialog in my installscript code. I followed the steps mentioned before regarding the function call and the settings to be made in IS to overcome this issue but in vain. Also, as a piece on information, I am using the evaluation version of InstallShield 10.5 with SP1 installed over it.

Any help on this regard would be appreciated.

Thanks and Regards,
Siva

nsivakumar
02-25-2005, 06:12 AM
Hi All,

Adding the following piece of code solved my problem.

sDLL = SUPPORTDIR ^ "ISSQLSRV.DLL";
nResult = StreamFileFromBinary( ISMSI_HANDLE, "ISSQLSRV.DLL", sDLL );
UseDLL(sDLL);

Thanks a lot for your valuable suggestions.

Regards,
Sivakumar.N