문제

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