Board index » delphi » CGI & Databases

CGI & Databases

Hello:

        Any help or address on how to write CGI scripts accessing databases (MS
Access via ODBC) with Delphi ???

--
                Thanks,
                                ALEX.

--------------------------------------------------------------------
Alejandro Moran-Marco                e-mail : amo...@tsc.uvigo.es
E.T.S.I. Telecomunicacion            FAX    : +34-86-812121
Campus Universitario                 Tel    : +34-86-812141
36200-VIGO (SPAIN)                   http://www.tsc.uvigo.es/~amoran
--------------------------------------------------------------------

 

Re:CGI & Databases


In article <339C10ED.41C67...@tsc.uvigo.es>, "Alejandro Moran Marco (GTS)"

Quote
<amo...@tsc.uvigo.es> writes:
>Hello:

>    Any help or address on how to write CGI scripts accessing
databases (MS
>Access via ODBC) with Delphi ???

I've done this using PDOX tables, not Access, but wasn't too bad.  A lot
depends on what server software you are running - this determines how you
are passed the arguments and how you are expected to reply.

Using M$ Personal Web Server (because it's free), I found that M$ fails to
follow the Win-CGI standards (surprised?) and instead follow something
more akin to UNIX.  Rather than getting the path to an ini file (the way
it's supposed to work), I found that I was passed the set of arguments on
STDIN and am expected to send back a formatted HTTP/HTML document on
STDOUT (easy - just open a text file with the path of '', read the data,
then reset and write the data).  The format of data was:
arg1=data1&arg2=data2&arg3=data3
Had to parse that out, but turns out to be rather trivial.

btw - you will get advice suggesting using isapi instead.  Again, whether
that is feasible depends on your server software.

/js

Re:CGI & Databases


In article <339C10ED.41C67...@tsc.uvigo.es>,
  "Alejandro Moran Marco (GTS)" <amo...@tsc.uvigo.es> wrote:

Quote

> Hello:

>    Any help or address on how to write CGI scripts accessing databases (MS
> Access via ODBC) with Delphi ???

> --
>            Thanks,
>                            ALEX.

> --------------------------------------------------------------------
> Alejandro Moran-Marco                e-mail : amo...@tsc.uvigo.es
> E.T.S.I. Telecomunicacion            FAX    : +34-86-812121

I am doing it with success using Delphi 3.0 and CGI Expert
(http://home1.swipnet.se/~w-17200/cgixpert.exe)

Lars

Quote
> Campus Universitario                 Tel    : +34-86-812141
> 36200-VIGO (SPAIN)                   http://www.tsc.uvigo.es/~amoran
> --------------------------------------------------------------------

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

Re:CGI & Databases


In article <19970609150100.LAA15...@ladder02.news.aol.com>,

Quote
jefsumm...@aol.com (JefSummers) wrote:
>Using M$ Personal Web Server (because it's free), I found that M$ fails to
>follow the Win-CGI standards (surprised?) and instead follow something

Win-CGI was a workaround in the first place to allow 16 bit Windows
apps to be run as CGI applets. With a 32 bit server and 32 bit CGI applets,
this is no longer necessary...

Quote
>STDIN and am expected to send back a formatted HTTP/HTML document on
>STDOUT (easy - just open a text file with the path of '', read the data,
>then reset and write the data).  The format of data was:

If you compile your app as a console application
{$APPTYPE CONSOLE}
then you don't have to open STDIN and STDOUT yourself...

i.e. this will work:
begin
  writeln('content-type: text/html');
  writeln;
  writeln('<h2>Yo, World!</h2>');
end.

--
=\
 *=- R.Moberg, CD-Player Pro info @ http://home.sn.no/home/mobergru
=/               my own webserver @ http://pumba.qsd.no

Re:CGI & Databases


Re:CGI & Databases


hi

Is there is a way to hide or change the SQL hour glass cursor when using
Interbase servers?

Thanks

MAH

Re:CGI & Databases


Re:CGI & Databases


True, but you get so much additional information with WIN-CGI.  On StdIn
it seems you only get the form variables.

/js

In article <HLynz0JfFeSa08...@oslonett.no>, mober...@oslonett.no (Rune

Quote
Moberg) writes:
>In article <19970609150100.LAA15...@ladder02.news.aol.com>,
>jefsumm...@aol.com (JefSummers) wrote:
>>Using M$ Personal Web Server (because it's free), I found that M$ fails
to
>>follow the Win-CGI standards (surprised?) and instead follow something

>Win-CGI was a workaround in the first place to allow 16 bit Windows
>apps to be run as CGI applets. With a 32 bit server and 32 bit CGI
applets,
>this is no longer necessary...

>>STDIN and am expected to send back a formatted HTTP/HTML document on
>>STDOUT (easy - just open a text file with the path of '', read the data,
>>then reset and write the data).  The format of data was:

>If you compile your app as a console application
>{$APPTYPE CONSOLE}
>then you don't have to open STDIN and STDOUT yourself...

>i.e. this will work:
>begin
>  writeln('content-type: text/html');
>  writeln;
>  writeln('Yo, World!</h2>');
>end.

Re:CGI & Databases


In article <19970612142600.KAA08...@ladder02.news.aol.com>,

Quote
jefsumm...@aol.com (JefSummers) wrote:
>True, but you get so much additional information with WIN-CGI.  On StdIn
>it seems you only get the form variables.

Hmm... I'm not sure what you mean.

That is; I don't know WIN-CGI much.

If by additional information you mean stuff like e.g. the user's
IP address or browser info, then that stuff is put into environment
variables.

Take a look at http://pumba.qsd.no/scripts/cgitest.exe for an output
of all the enviroment variables that are set by MS IIS.

--
=\
 *=- R.Moberg, CD-Player Pro info @ http://home.sn.no/home/mobergru
=/               my own webserver @ http://pumba.qsd.no

Re:CGI & Databases


Re:CGI & Databases


the cursor is called crSQLWait   this has a value which corresponds to a tlist of HCURSORs    screen.cursors[] :HCURSOR

what you have to do is

replace the HCursor  at position crSQLWait with your own.....

Use either CreateCursor LoadCursor or LoadCursorFromFile to create your own cursor

Be careful what you do with the old HCURSOR you may have to destroy it  using DestroyCursor

I believe that only CURRENT members of the Screen.Cursors Tlist get destroyed properly although I suggest you convince yourself of this

Send me a thank you

Nix.

Quote
Mohamed Hammady <mhamm...@idsc1.gov.eg> wrote:
>hi

>Is there is a way to hide or change the SQL hour glass cursor when using
>Interbase servers?

>Thanks

>MAH

Other Threads