|
April 12, 2000
Hosting Delphi and CBuilder
Database Applications at DelphiHost.com
By Dan English, owner of
"The Delphi Host"
Delphi and CBuilder provide many powerful
tools to create superb web applications quickly, but unless you
own a web server with a dedicated internet connection, finding a
place to deploy them can be a challenge. The Delphi Host was
created to meet the hosting needs of the Borland developer
community. In addition to all the standard hosting features you'd
expect, A Delphi Host virtual account offers full CGI/ISAPI
support, a full set of BDE drivers, Delphi/CB runtime libraries,
and support for client/server databases like Interbase, MS-SQL
and Advantage, from only $39.95 per month.
Deploying a Delphi ISAPI database
application at The Delphi Host is very simple...
1) First, you must request a BDE alias
that wil point to your private data directory. For our example,
an alias DHDB has been created. (It is helpful to also create an
alias of the same name on your local computer for testing).
2) Second, you must upload your data files
to the directory pointed to by the alias. We will be using the
"biolife" sample paradox files for our example.
3) Design your Delphi application to
access the database files and return HTML responses for the
client requests.

4) Our example application will display an
HTML page containing a list of records from the table, and allow
the user to view the details of each record by clicking on it.
5) Since we are writing an ISAPI dll, we
must add a TSession component to the webmodule. This ensures
thread safety when the table is accessed by several users
simultaneously.
6) The next step is to add a Table and set
the Database property to our alias (DHDB). The table will be
opened in the WebModuleCreate event, which is called the first
time our application is executed.
7) Now, a standard PageProducer and a
DatasetPageProducer are added to the webmodule. The standard
PageProducer is used to display a list of all records in the
table. The DatasetPageProducer is used to display fields within a
single record.
8) The page producers are each configured
with a short HTML template, stored in the HTMLdoc property.
Special tags in this template allow dynamic HTML to be inserted
as the document is sent to the user's browser.
9) Action events are then added to the
webmodule to perform the desired requests such as displaying the
list of records and displaying the details of a particular record.
10) After compiling and debugging locally,
the completed DLL application is then uploaded to the Delphi Host
into your private cgi-bin directory using FTP. You can then test
your new application using your web browser.
Click here to run the example application..
Click here to download the full example
source code for Delphi 5..

For more information about The Delphi
Host, please visit www.delphihost.com
or call toll free (877) 843-1218. The Delphi Host is owned and
operated by Realsoft Development (www.realsoftdev.com), an Inprise tool and component partner. "Delphi"
is a trademark of Borland/Inprise.
|