Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 01-03-2001, 01:46 AM
Gul Gul is offline
Junior Member
Join Date: Jan 2001
Posts: 1
Default How to run Database application on the internet

Hi all

I have developed a delphi database application containing 3 forms.

1. Form1 displays whole database.
2. Form2 allows to search the stuff from database.
3. Form3 allows to insert records in the database.

This application works fine on my machine.

I want to put it on to the server (intranet), so that different people can access it via internet (explorer) at the same time and can view/insert details.

I can create an installation program to install it on each machine. But I wish it to place it on one place only and access it via the internet explorer.

Can anyone help me how can I run or put it on the server and run it via internet explorer.


Reply With Quote
Old 01-03-2001, 02:04 AM
PoseFant PoseFant is offline
Senior Member
Join Date: Jan 2001
Posts: 1,002
Default RE: How to run Database application on the internet

This is possible using COM objects and ActiveX Server ...

Don't ask how ... I'm not into COM object programming ... )


Reply With Quote
Old 06-08-2017, 07:20 AM
Merovingio Merovingio is offline
Join Date: Jun 2015
Posts: 30

I use for my app standard architetture PHP-MySQL.
Call PHP page to update.
I use C++ with unit in pascal.
function httpPost(URL : string; Params: TStrings) : string;
ret: string;
FHttp := TIdHTTP.Create(nil);
Result := FHttp.Post(URL,Params);
Result := 'httpPost Error URL:'+URL;
MessageDlg(Result, mtError, [mbOK], 0) ;

bool CallHttp(String page, TStrings * params) {
params->Text = httpPost(FOptions->edHttp->Text+page,params);
return params->Strings[0] == "OK";

void __fastcall TFDif::FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift)
int i;
String res;
TStrings * ss;

if(Key == VK_F9) {
ss = new TStringList;

res = Parse("~",FItems->Lines->Strings[ItemID],1);

res = Parse("~",FItems->Lines->Strings[ItemID],2);

if (ss->Strings[1] > "") {
MessageDlg(ss->Strings[1], mtInformation, TMsgDlgButtons() << mbOK, 0);
delete ss;
Reply With Quote
Old 06-08-2017, 01:01 PM
Merovingio Merovingio is offline
Join Date: Jun 2015
Posts: 30

// updef.php


$id = $_GET['id'];
$ind = $_GET['ind'];

$rec = sql("update pec set Indirizzo='$ind' where id=$id");
$rec = sql("select * from pec where id=$id");

Reply With Quote
Old 06-08-2017, 01:02 PM
Merovingio Merovingio is offline
Join Date: Jun 2015
Posts: 30

this is updef.php


$status = "OK";
$field = "";

$id = $_POST['id'];

function setMsg($status,$field) {
if ($status <> "KO") {
echo "OK\nOperazione modifica '".$field."' acquisita\n";
} else {
echo "KO\nOperazione modifica '".$field."' NON acquisita\n";

function update($sql,$ind)
$field = " $ind=";
$status = "OK";
if(!sql("update pec set ".$sql)) $status = "KO";
return $field.$status;

$ind = $_POST['cap'];
$field = $field.update("cap='$ind' where id=$id",$ind);

$ind = $_POST['pro'];
$field = $field.update("prov='$ind' where id=$id",$ind);

$ind = $_POST['com'];
$field = $field.update("comune='$ind' where id=$id",$ind);

$ind = $_POST['ind'];
$field = $field.update("indirizzo='$ind' where id=$id",$ind);

$ind = $_POST['ind'];
$field = $field.update("attiva='S' where id=$id",'attiva');

Reply With Quote
Old 06-09-2017, 01:44 AM
Marsheng Marsheng is offline
Senior Member
Join Date: Nov 2008
Posts: 314

I sort of want to hijack this thread a bit which will help clarify a few things.

I'm in the same situation. I have a database running on a Raspberry PI with LAMP for the MYSql. I can access the data with my Delphi code via the web. The Pi is great, runs 24/7 on about 3 watts of power. It is also fast.

I now want to access some of the data via the web without downloading a program. I have looked into HTML and soon discovered that I needed to use PHP as well in order to access the database. HTML can't do it. I then discovered that PHP can't return data to a static page, it has to rewrite the whole HTML page. If you want to dynamically populate a HTML page, then you have to add in javascript and Ajax. (At this point the Delphi IDE looks really great. )

So the question is, how to access database info ?

The reason I say hijack is I don't want code but a discussion on options on how to do this?

I have Delphi 10 and haven't looked at all it can do. Can it do something similar ?

The next question is, how do you want to access the data, Mobile Phone, Android, PC, Max or Linux ? - If the web, all platforms are supported.

At this point I think the Delphi code will be used for the back end and the HTML etc for the front end. I really am not keen on learning 4 or so new languages but I cant see any other way forward.

Any suggestions ?

Thanks Wallace
Reply With Quote
Old 06-09-2017, 07:54 AM
Norrit Norrit is offline
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335

Well, in design I think there is already an issue.
Backend is more then just a database with which you connect. There should be a complete layer (actually multiple, but there's only 1 communication layer) which lets you interact with the db. This layer can be SOAP, but at the moment I'm more into using REST. That's just a choice.
This whole backend can be written in Delphi, since through Indy it supports building a SOAP/REST layer. I've left Delphi and write in C#, but again, that's a choice.

As for the frontend, there are several ways, but all require learning 1 or more new languages. In short web-development is not as straight-forward as windows application development.

I'm not sure if your question is concerning the backend or the frontend, but this is in short what the structure should be
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 02:34 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.