VdB/BDE Version Test for Web Servers
by John Staub,  President  Staub & Associates, Inc.

The author would like to thank Colyn Serfontein, Greg Neid, Michael Nuwer and Jean-Pierre Martel for their invaluable editorial and application testing assistance.

What version are we running?

One problem we occasionally encounter when building and testing Visual dBASE web-based applications is determining which version of Visual dBASE and the Borland Database Engine (BDE) is running on the server. If we are hosting the app, there is no problem…but if we are building the app for a client's web server and they already have the Visual dBASE runtimes and the BDE loaded, we needed a way to quickly test for version 7.01 versus 7.5.

Background on the version differences

While the runtimes for 7.5 will support web applications built in 7.01, the reverse is not true. VdB 7.5 supports and uses StdIn/StdOut methods for CGI response and HTML streaming, 7.01 requires vdb_cgi.exe to support HTML streaming. We built our first version test in 7.5, loaded the 7.01 runtimes on our server, ran the app and our server timed-out. It took us a moment to realize why…we used webclass.cc and another custom control based upon webclass.cc to stream-out the response. The 7.01 runtimes would not support our streaming methods.

Back to the drawing boards…But we wanted to build this in 7.5…we all but eliminated 7.01 from our system. The answer…build and compile the .prg file in 7.5, but call vdb_cgi.exe so we could stream-out the response regardless of the version running.

Remembering what we learned from the dBASE News groups and our own work, we quickly built ver.prg (contained in the attached file). It uses variables to store the information from two built-in vdB functions; version(9) to determine the VdB version and version(.89) to retrieve the BDE information. Next we built a simple method that streams-out an HTML response (see ver.prg in the download package).

How to test your version

To use versiontest.exe (contained in the attached download package), extract vdb_cgi.exe and versiontest.exe to a folder on your web server. Next, start your browser and enter the address for your server and the folder, i.e. (note: this also works with domain addresses such as http://www.mysite.com/myfolder/vdb_cgi.exe?versiontest.exe) (also note the call for vdb_cgi.exe contains an underscore as in vdb_cgi.exe?versiontest.exe)

The result, a simple response page providing you the VdB and BDE version on your server, whether you are running 7.01 or 7.5.  Keeping in mind that this program uses the standard Windows path to test the version, i.e. the current folder, then the Windows/System, Winnt/system or WinNT/system32 folders, you can test your version in a variety of ways. Just place vdb_cgi.exe and versiontest.exe in the folder you want to test and call that folder through your browser.

Why test the version?

  When building and testing a web application, troubleshooting an error message can at times be a bit difficult. Testing for the correct version of VdB runtimes can eliminate one possibility of conflict.

To download versiontest.exe and vdb_cgi.exe,  click here
(they are inside a 85Kb zipped executable file)

For more information on  Staub & Associates, Inc., please visit http://www.staubassociates.com
For information on hosting your dBASE applications or other web sites, please contact wrightd@dcs-fl.com