InstallShield 2012: Need to switch between sql scripts (sql server & oracle) based on property

时间:2021-07-16 22:38:25

The web applications I am installing can run against either a SQL Server or Oracle database. I need to be able to determine which database the user has (client is suggesting a property file) and then dynamically tell InstallShield whichSQL script to run, I know I can figure out how to determine which database is installed. My question is how do I configure the Feature/Component and tell InstallShield which script to use.

我正在安装的Web应用程序可以针对SQL Server或Oracle数据库运行。我需要能够确定用户拥有哪个数据库(客户端建议使用属性文件),然后动态告诉InstallShield运行哪个SQL脚本,我知道我可以弄清楚如何确定安装了哪个数据库。我的问题是如何配置功能/组件并告诉InstallShield使用哪个脚本。

1 个解决方案

#1


0  

I don't have any Oracle servers available to me nor do I have the Oracle Instant Client. If I did, it seems I'd use a Basic MSI project included in InstallShield to build an Oracle Instant Client MSI and add it to my installer as a setup prerequisite. Kind of odd but I guess they couldn't get IBM / Oracle to play nicely.

我没有可用的任何Oracle服务器,也没有Oracle Instant Client。如果我这样做,似乎我会使用InstallShield中包含的Basic MSI项目来构建Oracle Instant Client MSI,并将其作为设置先决条件添加到我的安装程序中。有点奇怪,但我猜他们无法让IBM / Oracle发挥得很好。

So let's say I had all of that. I'd create a Sql connection that supported both MS and ORA SQL and build it. I'd run the installer with logging on and use the SQLLogin dialog to browse to a SQL instance and an Oracle Instance.

所以,让我说我拥有所有这一切。我创建了一个支持MS和ORA SQL的Sql连接并构建它。我将通过登录运行安装程序并使用SQLLogin对话框浏览到SQL实例和Oracle实例。

Then I'd look at that logfile and see if there's any evidence of the built-in InstallShield SQL custom actions setting a property that indicates the type and/or version of database server that it connected to. Hopefully something will surface because I didn't find anything in the documentation.

然后我会查看该日志文件,看看是否有任何证据表明内置的InstallShield SQL自定义操作设置了一个属性,该属性指示它连接到的数据库服务器的类型和/或版本。希望有些东西会浮出水面,因为我在文档中找不到任何内容。

Once I figured that out, I'd use the property in a conditional expression so that the SQL scripts only ran on the type of database server they were intended.

一旦我弄明白了,我就会在条件表达式中使用该属性,这样SQL脚本只能运行它们所针对的数据库服务器类型。

#1


0  

I don't have any Oracle servers available to me nor do I have the Oracle Instant Client. If I did, it seems I'd use a Basic MSI project included in InstallShield to build an Oracle Instant Client MSI and add it to my installer as a setup prerequisite. Kind of odd but I guess they couldn't get IBM / Oracle to play nicely.

我没有可用的任何Oracle服务器,也没有Oracle Instant Client。如果我这样做,似乎我会使用InstallShield中包含的Basic MSI项目来构建Oracle Instant Client MSI,并将其作为设置先决条件添加到我的安装程序中。有点奇怪,但我猜他们无法让IBM / Oracle发挥得很好。

So let's say I had all of that. I'd create a Sql connection that supported both MS and ORA SQL and build it. I'd run the installer with logging on and use the SQLLogin dialog to browse to a SQL instance and an Oracle Instance.

所以,让我说我拥有所有这一切。我创建了一个支持MS和ORA SQL的Sql连接并构建它。我将通过登录运行安装程序并使用SQLLogin对话框浏览到SQL实例和Oracle实例。

Then I'd look at that logfile and see if there's any evidence of the built-in InstallShield SQL custom actions setting a property that indicates the type and/or version of database server that it connected to. Hopefully something will surface because I didn't find anything in the documentation.

然后我会查看该日志文件,看看是否有任何证据表明内置的InstallShield SQL自定义操作设置了一个属性,该属性指示它连接到的数据库服务器的类型和/或版本。希望有些东西会浮出水面,因为我在文档中找不到任何内容。

Once I figured that out, I'd use the property in a conditional expression so that the SQL scripts only ran on the type of database server they were intended.

一旦我弄明白了,我就会在条件表达式中使用该属性,这样SQL脚本只能运行它们所针对的数据库服务器类型。