Modify the
connection information
Where you are
Run the Connection
Object wizard
> Modify the connection
information
Complete the login
and logout scripts
You can now call the connection service manager to establish a
database connection, but you should open a database connection only if the
user enters a valid ID and password in the login window. You will
therefore add the connection service call to the Clicked event of the OK
button on this window, substituting user-entered information for
information from the pbtutor.ini file.
However, before you add the call to the OK button, you remove or
comment out the ProfileString calls that the connection service manager
makes to get user ID and password information from the INI file. Then you
modify the DBParm parameter in the pbtutor.ini file, because it includes
hard-coded user ID and password values that were copied from the pb.ini
file.
In this exercise you:
-
Modify the of_GetConnectionInfo function
-
Call the connection service manager