Oracle VDF Application Launcher

By Geoff Furlong, August 2000

Ever wanted to have a stand-alone program that will prompt and login to Oracle and then chain your program? There are samples out there but these remain limited.

The following code uses Runtime registry entries or workspaces to generate a list of available applications for the launcher to "chain" to once logged into Oracle.

The latest Mertech drivers do have an automatic login feature that will popup, if you or your user tries to open a file whose rootname starts with "ORA_DRV". This works great, but sometimes it is just not sufficient.
In most of my apps, I want to log in before anything in the app starts such as initialisation processes.
This program will do the trick.

Oracle Launcher screenshot

Installing the Launcher:

You must have a VDF runtime registry key like the following. You can use the enclosed Oracle_Login.reg as a starting point:

 

">REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Data Access Corporation\Visual DataFlex\5\Oracle_Login]
"VDF"="Oracle_Login"
"ChainTo1"="The Big Application (Big)"
"ChainTo2"="Order Entry (Order)"
"ChainTo3"="Contact Address Book (Contact)"
"ChainTo4"=""
"ChainTo5"=""
"ChainTo6"=""
"DFPath"=".;X:\\Oracle_Login;Y:\\VDFx\\Bin;Y:\\VDFx\\Lib;Y:\\VDFx\\Usr"

(Where X: is where the Oracle_Login program's workspace lives and Y: is where you're VDF directories are.)

Compiling the Source Code

Just create a directory, e.g. X:\Oracle_Login, and download the files listed below into it. Compile using either the default DFPath or the one listed above. The resulting Oracle_Login.vd? can be launched from anywhere since it requires no data files.

Note that the workspace, runtime key or VDF program name is in brackets. These "ChainTo..." values in the registry, are used to fill a combo form object in the launcher which provides a user-defined list of "chainable". This is important since the launcher extracts these from the filled combo form so it can launch the required application. programs.

 

Starting the Launcher From The Command Line/Shortcut:

You can create a shortcut with a command line:

Y:\VDFx\Bin\DFRun.exe Oracle_Login {Server} {MyUserName} {MyPassword}

If Server, MyUserName and MyPassword are used, their values will appear in the launcher as a default.

Server will be the Net8 or SQLNet TNSName you've created to connect to an Oracle database.

 

The "Chain To" Combo Form

As mentioned earlier, this is filled with entries from the launcher's registry settings. After successfully logging the user onto the Oracle database, the selected application in this combo form will be chained/activated.

 

The "This is my application's username and password" Checkbox

If you have checked this checkbox, the user ID and password used to login to Oracle will be added to the command line parameters of the application the launcher will "chain to". This is useful if you have a login panel on an application and you don't want users to have to login twice. You can simply change the launched application to pickup the username and password from the command line parameters supplied by the launcher and suppress the application's login panel if there is a successful login to the application.

 

THE LAUNCHER!

You can download the VDF5.1 executable from:

http://www.msg.uk.com/Geoff/Oracle_Login/Oracle_Login.vd5

You can download the VDF6.2 executable from:

http://www.msg.uk.com/Geoff/Oracle_Login/Oracle_Login.vd6

 

THE CODE!

You can download the following files from the MSG website:

http://www.msg.uk.com/Geoff/Oracle_Login/Oracle_Login.src (The source file)

http://www.msg.uk.com/Geoff/Oracle_Login/Oracle.bmp (A simple bitmap used in the launcher)

http://www.msg.uk.com/Geoff/Oracle_Login/Oracle_Login.reg (A sample registry settings file)

http://www.msg.uk.com/Geoff/Oracle_Login/Oracle VDF Application Launcher.lnk (A sample shortcut for running the launcher with a default server, username and password)

or as a zipped up package, together with these comments from VDF-GUIdance


Geoff Furlong (geoff@msg.uk.com)
IT Consultant
MSG Business Systems Ltd.
- Developers of the Fleet Management System