The Connect Dialog Box
In the section
Creating a Session, you saw how a session object is created with the connection parameters (user name, password, and so on) hard-coded in the source code. The
queryConnect member function can be used to obtain some or all of these parameters from the end user.
The following code extract initializes a session object with a connection string from which the password is missing. A dialog box is then automatically displayed in which the user can enter his password.
IlvDisplay* dpy;
IlvAbstractView* view;
...
IliSQLSession* session;
session = new IliSQLSession(“oracle”, “scott/@options”);
session->lock();
if (session->queryConnect(dpy, view, IliQueryPassword)) {
...
}
session->unLock();
Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.