925 Corel WebServer: Corel WebServer
VERSIONS: Paradox 8 and later
Subject: Corel WebServer

BY: Liz < lawATaros.net >
Date: 3 April 1999

It took me a while to figure out the Corel Web Server... Here's how I did it:

First, I opened the Corel Web Server application (not the forms or control in Paradox, but the app in the Start menu). Then I opened a web browser and typed in the name of my computer (don't know if it makes a difference, but my computer has a permanently assigned IP address and is constantly connected to the internet). This opened up the default html document as specified in the Corel Web Server's properties dialog (File > Properties...; Pages tab; Base Path field).

After this, I set the :WSample: alias in Paradox as the working directory, opened all three forms, and then started opening the various web pages in this alias's \Pages sub directory (you don't need the Corel Web Server application open for these to work, the Web Server Controls on the forms work for this.) I found that Server.fsl works with the hercules.htm page and the customer.db; Insert.fsl works with contacts .db and insert.htm; query.fsl works with query.htm. (open these forms one at a time (with the Corel Web Server app closed) and type the name of your computer into the url field of the browser and see what happens.) Once I'd figured out what each of these does, and gotten them to work, I opened them in design mode to view code, and viewed the source of the matching .htm files and then was able to piece together how they work.

Finally, I made a simple table and simple form, published the form to html. I created a new Paradox form with a Web Server Control object, set the object's properties to point to the directory containing my html form & the table, and attached code to its OnPostRequest:
var
 tc TCursor
endVar

tc.open(":RACE:TEST.DB")
tc.edit()
tc.insertRecord()
st = request.getfield("TestAlpha")
; name of one of the fields on the form I published to html
tc.(1) = st   ; the first field in TEST.DB is TestAlpha
tc.postRecord()
tc.close()
Then ran the form with the web server control, opened the web browser, typed in the name of my computer and the html form opened (still ugly), typed in some sample text, hit Submit and the record was posted to the table. Basically, the web server control's OnPostRecord event is triggered when Submit is pressed and knows the name of the html form that triggered the event and does whatever you code in ObjectPAL as a response.

Also, I'm pretty sure you have to have TCP/IP set up on your computer, and your computer has to have at least a name, if not an IP address.


SYLVAIN CHARRON - PRODUCT MANAGER, COREL PARADOX

The Web functionality in Corel Paradox 8 is intended for a Personal Solution or small corporate workgroup. The Corel Web Server supports a limited set of users and functionality. Paradox tables and reports can be published statically and dynamically to HTML, and Paradox forms can be published to HTML statically only, and is generally limited to Edit fields, radio buttons, list boxes, combo boxes and check boxes. These static forms can then be used in conjuction with OPAL and the Web Server Control to create dynamic web forms. You could also use any web authoring tool to create you web forms and then connect to them using OPAL and the Web Server Control. The tools for editing HTML web forms are not present in this version 8 solution.

For more information, the user can read the online help which refers to "Publishing Forms to HTML".


BY: DAN ALDER - COREL PARADOX QA

What you will need is live database access then - a basic web-based application. For this you would look at the Corel Web Server Control (websrv.ocx, I think), included with Paradox 8.

If your needs are small, this should work. The CWS was never designed for full internet use, only intranet / workgroup type functions, but if you are expecting only small numbers of hits (~500-1000 hits, or about 10-20 visits per day - remember that each visit is going to result in several dozen requests), everything should work fine. You will need to run this form on the webserver itself, which means you need a dedicated line to the internet, or a machine at your ISP's site.

Security is also an issue - there is none. The CWS does not handle SSL or any other encryption automatically, so I wouldn't recommend setting up an online payment system.

The web server control tends to be more stable on Windows NT; I would recommend using that rather than Windows 95/98.

To get a basic site working, start by putting together your static web pages in HTML. (Your home or start page, company information, the query form, etc.) Put these in a directory on your hard drive. The start page should be named index.htm or index.html.

In Paradox, place an instance of the control on a blank form, set the base path property to the directory containing your pages, and run the form. Open your browser and go to http://127.0.0.1/. You should see your html pages.

Because the Web Server Control is an ActiveX control sitting on a Paradox form, you access the server's properties and methods like any other OLE Automation Server. The properties are documented in the pdxinet.hlp file included in the \corel\suite8\Paradox directory. Take a look at the example included in the websrv\sample directory (:wsample: alias) - this will show you how to retrieve information from a HTML form, process example included in the websrv\sample directory (:wsample: alias) - this will show you how to retrieve information from a HTML form, process it, and return a page to the user. The nice thing about this is that all of your processing is done in ObjectPAL.

You will need to know HTML, however, to construct the resulting pages to be returned to the browser. One of the mose complete references I've come across is the HTML Reference Library by Stephen LeHunt. It's available in HTMLHelp format from any TUCOWS Mirror, under the HTML Accessories section. (Go to http://www.tucows.com for the mirror closest to you.)

............

The CWS control is a fully functional, standalone web server itself. It responds to requests from a browser and sends pages back.

Note that if you want to run the CWS on a machine that is already running another web server, you will have to change the port that it listens to (to 8000, for example.). You will then have to change the URL, from http:/// to http://:/ (for example, http://127.0.0.1:8000/)


To index