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
- :
- Using SQL SMO from InstallScript
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
Nov 13, 2008
05:55 AM
Using SQL SMO from InstallScript
Hi,
I have a custom action in my install (basic MSI project) that currently uses SQL DMO to get a list of SQL Server database instances that are running on the machine that the installation is running from.
I create the DMO object via a call to CreateObject in InstallScript, but for some reason, the call to ListInstalledInstances on the SQLServer object fails on Windows Server 2008.
So, we thought about upgrading to SMO to see if this would solve the problem. However, the functionality that I need seems to only be available via a static method in SMO (http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.smoapplication.enumavailablesqlservers.aspx).
Is it possible to call static methods after creating a COM object via CreateObject? I tried sqlServer.EnumAvailableSqlServers(), but that failed.
If anybody could offer any help on this it would be appreciated.
I have a custom action in my install (basic MSI project) that currently uses SQL DMO to get a list of SQL Server database instances that are running on the machine that the installation is running from.
I create the DMO object via a call to CreateObject in InstallScript, but for some reason, the call to ListInstalledInstances on the SQLServer object fails on Windows Server 2008.
So, we thought about upgrading to SMO to see if this would solve the problem. However, the functionality that I need seems to only be available via a static method in SMO (http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.smoapplication.enumavailablesqlservers.aspx).
Is it possible to call static methods after creating a COM object via CreateObject? I tried sqlServer.EnumAvailableSqlServers(), but that failed.
If anybody could offer any help on this it would be appreciated.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 02, 2009
03:47 PM
I am not sure I understand what it is you are trying to do. That said, there are multiple built-in dialog boxes that you can use to get various information regarding SQL Server. Take a look at SQLBrowse in the InstallShield Help Library and you will see some of them.
Tim
Tim