🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1236

Re: CGI Web server Application

#1236
From: Butch McLeod
Date: Sun, 27 Mar 2005 18:29
49 lines
2823 bytes
The BCDEMOS alias is installed during the installation of C++ Builder 5 pro 
and is used by some of the example apps and it works on my computer.
I have also tried connections to other databases I've created using paradox 
and Interbase. The only place they don't work is in a cgi web server app.
If I add a TTable component, set to active in the designer, add the 
TDataSetTableProducer component set and set up the columns, data displays in 
the TDataSetTableProducer component while in the designer.

The following code returns:
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be
displayed.
HTTP 500 - Internal server error
Internet Explorer

#include "Main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TWebModule1 *WebModule1;
//---------------------------------------------------------------------------
__fastcall TWebModule1::TWebModule1(TComponent* Owner): TWebModule(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TWebModule1::WebModule1WebActionItem1Action(
      TObject *Sender, TWebRequest *Request, TWebResponse *Response,
      bool &Handled)
{
    try
   {
       Database1->Connected = true;
    }
    catch(EDatabaseError &E)
    {
       Response->Content = "<p>Database Error</p>";
    }

    catch(...)
    {
       Response->Content = "<p>Other Error</p>";
    }

   Response->Content = "<p>Hello</p>";
}
//---------------------------------------------------------------------------

Butch.
Technical Details
Message-ID: <4246fbca$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!tiscali!newsfeed2.ip.tiscali.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <424613ab@newsgroups.borland.com> <42469f0f$1@newsgroups.borland.com> <4246dfeb$1@newsgroups.borland.com> <4246e664@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,af8465d282730681
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Butch McLeod" <levernemcleod@eastlink.ca>
Newsgroups: borland.public.cppbuilder.internet.web
References: <424613ab@newsgroups.borland.com> <42469f0f$1@newsgroups.borland.com> <4246dfeb$1@newsgroups.borland.com> <4246e664@newsgroups.borland.com>
Subject: Re: CGI Web server Application
Date: Sun, 27 Mar 2005 14:29:13 -0400
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 142.177.34.35
Message-ID: <4246fbca$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111948234 142.177.34.35 (27 Mar 2005 10:30:34 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!tiscali!newsfeed2.ip.tiscali.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail