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
- :
- Re: SQL Server Function Declarations
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
‎Oct 04, 2011
11:11 AM
SQL Server Function Declarations
I am trying to modify the results returned from the SQLBrowse/SQLBrowse2 function.
I am trying to use SQLRTGetBrowseOption and SQLRTSetBrowseOption functions in an InstallScript MSI project .rul file.
The compiler reports both as undefined.
I have already included the line:
#include "ifx.h"
If I include the SQLRT.h file anywhere in my script it complains about duplicate definitions, but this header seems to be the one containing the function declarations.
My call to SQLRTInitialize2(); on the lines preceding the undefined functions works perfectly well.
Q. How do I add support for the two functions in an InstallScript MSI project?
Thank you in advance.
I am trying to use SQLRTGetBrowseOption and SQLRTSetBrowseOption functions in an InstallScript MSI project .rul file.
The compiler reports both as undefined.
I have already included the line:
#include "ifx.h"
If I include the SQLRT.h file anywhere in my script it complains about duplicate definitions, but this header seems to be the one containing the function declarations.
My call to SQLRTInitialize2(); on the lines preceding the undefined functions works perfectly well.
Q. How do I add support for the two functions in an InstallScript MSI project?
Thank you in advance.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 05, 2011
09:13 AM
The InstallScript functions SQLRTGetBrowseOption and SQLRTSetBrowseOption are applicable to InstallScript projects. They are not supported in InstallScript MSI projects.
For an InstallScript MSI project, I think you may need to set Windows Installer properties such as IS_SQLSERVER_LOCAL_ONLY or IS_SQLSERVER_REMOTE_ONLY, depending on your requirements. For more information, see Overriding the Default SQL Run-Time Behavior.
I hope that helps.
For an InstallScript MSI project, I think you may need to set Windows Installer properties such as IS_SQLSERVER_LOCAL_ONLY or IS_SQLSERVER_REMOTE_ONLY, depending on your requirements. For more information, see Overriding the Default SQL Run-Time Behavior.
I hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 07, 2011
06:28 AM
I read the link you included and it sounds like you should be able to set them.
However when i go to the connections advanced tab there are only 5 properties to set and none of them are the two you mentioned.
I suspect I'm not understanding the tabs functionality but I'm stuck !
I also have two question on this.
I tried a more comprehensive way to customise the behavior by using DefineDialog and editing the handler code for the server list creation.
Specifically:
SQLRTGetServers2( szConnection, TRUE );
Which I believe lists only local servers.
However, I got a list of two, one of the servers is on another pc on the same domain as I am.
Q. What is meant by LOCAL when refering to SQL server instances listed in this dialog ?
Q. What I am trying to achieve is to list only SQL Servers present on the PC the software is being installed on.
Is there a better way to do this ?
However when i go to the connections advanced tab there are only 5 properties to set and none of them are the two you mentioned.
I suspect I'm not understanding the tabs functionality but I'm stuck !
I also have two question on this.
I tried a more comprehensive way to customise the behavior by using DefineDialog and editing the handler code for the server list creation.
Specifically:
SQLRTGetServers2( szConnection, TRUE );
Which I believe lists only local servers.
However, I got a list of two, one of the servers is on another pc on the same domain as I am.
Q. What is meant by LOCAL when refering to SQL server instances listed in this dialog ?
Q. What I am trying to achieve is to list only SQL Servers present on the PC the software is being installed on.
Is there a better way to do this ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 10, 2011
12:35 AM
You can simply call the MsiSetProperty InstallScript function to specify the IS_SQLSERVER_LOCAL_ONLY property as follows:
MsiSetProperty(hMSI, "IS_SQLSERVER_LOCAL_ONLY", "1");
When the IS_SQLSERVER_LOCAL_ONLY property is specified, the SQLBrowse dialog lists the SQL server instances present, as well as SQL server instances registered for DSNs on the PC the software is being installed on.
The SQL server instances registered for DSNs may include remote instances. If you want to list only SQL Servers present on the PC the software is being installed on, you need to write code to remove them from the list returned by the SQLRTGetServers2 function.
MsiSetProperty(hMSI, "IS_SQLSERVER_LOCAL_ONLY", "1");
When the IS_SQLSERVER_LOCAL_ONLY property is specified, the SQLBrowse dialog lists the SQL server instances present, as well as SQL server instances registered for DSNs on the PC the software is being installed on.
The SQL server instances registered for DSNs may include remote instances. If you want to list only SQL Servers present on the PC the software is being installed on, you need to write code to remove them from the list returned by the SQLRTGetServers2 function.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 11, 2011
11:39 AM
Thanks
This leads me to a question I had a while back but i'll start a new thred for that.
This leads me to a question I had a while back but i'll start a new thred for that.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)