为什么 SQL 文本替换在 InstallShield 中不起作用

发布于 2024-08-13 21:02:42 字数 560 浏览 2 评论 0原文

我正在尝试在安装脚本项目中运行一些动态 SQL。在脚本的 UI 部分,我有以下代码:

TextSubSetValue("<INSERTSITES>", message, TRUE);
message = "";
MessageBox(message, INFORMATION);
TextSubGetValue("<INSERTSITES>", message, FALSE, TRUE);
MessageBox(message, INFORMATION);

消息框仅用于调试,不输出任何内容,然后按照您的预期输出插入语句。在我的 sql 脚本部分中,我有一个脚本:

$$ISITES$$

然后我的“文本替换”选项卡如下所示: 文本替换 http://mykroft.net/tReplace.png

但由于某种原因,替换最终结束与一个空白字符串。我错过了什么吗?更换在哪里/何时发生?

I'm trying to run some dynamic SQL in an installscript project. In the UI portion of the script I have the following code:

TextSubSetValue("<INSERTSITES>", message, TRUE);
message = "";
MessageBox(message, INFORMATION);
TextSubGetValue("<INSERTSITES>", message, FALSE, TRUE);
MessageBox(message, INFORMATION);

The message boxes are just for debug and output the nothing and then the insert statement as you would expect. In my sql scripts section i have a script that is just:

$ISITES$

Then my Text Replacement tab looks like this:
Text Replacement http://mykroft.net/tReplace.png

But for some reason the replacement just ends up with a blank string. Am I missing something? Where/When does the replacement even happen?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

徒留西风 2024-08-20 21:02:42

替换不能是文件中的唯一内容,否则文件不会运行。我在文件末尾添加了一条 select 语句,如下所示:

$ISITES$
SELECT * FROM [Site]

这使得文件在替换后运行。

Replacements cannot be the only thing in the file or the file isn't run. I added a select statement at the end of the file like this:

$ISITES$
SELECT * FROM [Site]

Which makes the file run with the replacement.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文