Installshield问题显示带有installscript的sql对话框

时间:2021-09-02 22:40:25

I am creating an installer using an installscript project in install shield.

我正在使用install shield中的installscript项目创建安装程序。

The dialog I am trying to show is coded as follows:

我试图显示的对话框编码如下:

MessageBox("Doing sql call", INFORMATION);

Dlg_SqlServerTest: 
    szConnection = "";
    svServer = ""              ;
    svUser = "";
    svPassword = "";
    bvWindowsLogin = FALSE;
    svCatalog = "";
    bShowCxnName = TRUE;
    bShowDBCatalog = TRUE;

    nResult = SQLServerSelectLogin2(szConnection, svServer, svUser, svPassword, bvWindowsLogin, svCatalog, bShowCxnName, bShowDBCatalog);

    MessageBox("Done sql call", INFORMATION); 

Nothing actually shows. Now if I check the nResult object it has the value -1 in it. This is the standard dialog, I have not modified it in anyway.

实际上没有任何表现。现在,如果我检查nResult对象,它的值为-1。这是标准对话框,我还没有修改它。

If I change this call to be a call to "SQLServerSelect" instead that shows no problem. So my code is being hit no problem. But for some reason will not go into my code to show the login for sql.

如果我将此调用更改为对“SQLServerSelect”的调用,则表示没有问题。所以我的代码被击中没问题。但由于某种原因不会进入我的代码来显示sql的登录。

The code has been put after the call to "OnSQLServerInitialize()".

在调用“OnSQLServerInitialize()”之后放置了代码。

Any ideas?

有任何想法吗?

1 个解决方案

#1


0  

Not dure why it did not work. However, I have found that if you go into "setup.rul" and from the 2 dropdowns choose "BeforeMoveData" and "OnSQLServerInitialize" it will add some code that does the call to show the dialog. It must do some initialising that I didn't do.

不知道为什么它不起作用。但是,我发现如果你进入“setup.rul”并从2个下拉列表中选择“BeforeMoveData”和“OnSQLServerInitialize”,它将添加一些代码来执行调用以显示对话框。它必须做一些我没做的初始化。

I still haven't found out why it says my connection details connect fine when they are wrong, but that is my next issue!

我仍然没有找到为什么它说我的连接细节在错误时连接正常,但那是我的下一个问题!

#1


0  

Not dure why it did not work. However, I have found that if you go into "setup.rul" and from the 2 dropdowns choose "BeforeMoveData" and "OnSQLServerInitialize" it will add some code that does the call to show the dialog. It must do some initialising that I didn't do.

不知道为什么它不起作用。但是,我发现如果你进入“setup.rul”并从2个下拉列表中选择“BeforeMoveData”和“OnSQLServerInitialize”,它将添加一些代码来执行调用以显示对话框。它必须做一些我没做的初始化。

I still haven't found out why it says my connection details connect fine when they are wrong, but that is my next issue!

我仍然没有找到为什么它说我的连接细节在错误时连接正常,但那是我的下一个问题!