Вопрос

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

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.

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.

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

Any ideas?

Это было полезно?

Решение

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.

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top