delphi運行后總是彈出數據庫的登陸,但是不不輸入密碼點擊確定仍然可以進行操作。

解决方案 »

  1.   

    我的的是delphi6,之前操作都是正常的,不知怎么就出現這種情況了,不知道是不是delphi的設置出了問題
      

  2.   


    TADOConnection.LoginPrompt Property
    TADOConnection Class | TADOConnection Members | ADODB Namespace | Description | See Also
    Collapse AllSpecifies whether a login dialog appears immediately before opening a new connection.Pascal
    property LoginPrompt: Boolean;
    C++
    __property Boolean LoginPrompt;
    Description
    Set LoginPrompt to true to provide login support when establishing a connection. LoginPrompt controls two things: the occurrence of the OnLogin event, and the appearance of a default login dialog that prompts users for a name and password when you include DBLogDlg.hpp in your unit (C++) or add DBLogDlg to your uses clause (Delphi). When the OnLogin event occurs and when the default login dialog appears depend on the type of connection component: For TDatabase, TIBDatabase, and TSQLConnection, the dialog appears after the BeforeConnect event and before the AfterConnect event, unless you supply an OnLogin event handler. If there is an OnLogin event handler, that event occurs in place of the login dialog, and there is no need to include DBLogDlg.hpp in your unit (C++) or add DBLogDlg to your uses clause (Delphi). If correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler, the connection fails. The OnLogin event does not fire unless LoginPrompt is set to true. For TADOConnection components, the dialog appears after the OnWillConnect event and before the BeforeConnect event. If there is an OnLogin event handler, that event occurs after the login dialog. If you do not include DBLogDlg.hpp in your unit (C++) or add DBLogDlg to your uses clause (Delphi), the OnLogin event occurs but there is no default login dialog. If correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler, the connection fails. The OnLogin event does not fire unless LoginPrompt is set to true.  For DataSnap SOAP connection components, the dialog appears after the OnGetUsername event and before the BeforeConnect, AfterConnect, and OnLogin events. If the user cancels from the login dialog, no attempt is made to open a connection. When LoginPrompt is false, the application must supply user name and password values programmatically: For TDatabase, the user name and password can be supplied as USER NAME and PASSWORD parameters in the Params property.  For TADOConnection, the user name and password can be supplied as the ConnectionString property.  For TSQLConnection, the user name, password, and database can be supplied as UserName, Password, and Database parameters in the Params property, or provided as connection parameters associated with the connection name. For DataSnap SOAP connection components, there is no built-in use for the user name and password supplied by the login dialog. (The UserName and Password properties of TWebConnection are unrelated). Warning: Storing hard-coded user name and password entries as property values or in code for an OnLogin event handler can compromise server security.