Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CGI script with Clarion

75 views
Skip to first unread message

Chris Bordeman

unread,
Jun 4, 2001, 5:10:43 PM6/4/01
to
How can I write a CGI script with Clarion (c55ee) and IIS?

Thx.

--
Chris Bordeman
Developer, EMI


Rod Webster

unread,
Jun 5, 2001, 7:00:34 AM6/5/01
to
Chris,

This should not be all that difficult. A CGI script simply writes formatted
HTML to stdout (the console). After processing, you need to write to the
screen (stdout) in a DOS window.
I don't do enough with Clarion for Windows to know how to do this. It might
just be as simple as creating an ASCII file with the NAME('stdout')
attribute.

You would have to modify the errorclass to prevent any dialog boxes from
opening on the server. Set the Silent Property (See ABC Ref Vol 1 p 373).
This does not prevent the Stop dialog on a fatal error, so you need to
prevent it from raising. I modified the template to stop this from happening
by referring to the Silent property. Also, the errorlogging features would
be useful so all errors are spooled to a text file. Set the LogErrors
property (See ABC Ref Vol 1 p 373). This spools errors to a file called
ABCError.Log.

Another option (probably better performance than CGI) would be via the IBC
classes and IC connect to write out the HTML page to disk and return it to
the client using the IBC classes. I have just looked at these briefly and
will be exploring them in the future. See TakeFile and TakeHtmlPage in the
IBC Broker Class documentation. They refer to the following prototype in
ICSTD.INC:
IC:SendPage(STRING, UNSIGNED),NAME('IC$SendPage')
(Parameters are: FileName and Flags)

Let me know how you get on if you go down the IBC track as I would like to
serve up data from a memory buffer in an internet app.

Rod Webster

"Chris Bordeman" <ch...@autoboatrv.net> wrote in message
news:3b1bfa87$1...@news.softvelocity.com...

Brian Staff

unread,
Jun 5, 2001, 4:18:20 PM6/5/01
to
Chris/Rod,

This is much easier than you think to write a server-side CW program
that uses CGI...look at the following API calls:

STD_INPUT_HANDLE EQUATE(-10) ! Standard input and output handles
STD_OUTPUT_HANDLE EQUATE(-11)
STD_ERROR_HANDLE EQUATE(-12)
ReadFile(handle,long,dword,long,long),bool,raw,pascal,proc
WriteFile(handle,long,dword,long,long),bool,raw,pascal

Brian Staff (Phoenix) - Team TopSpeed [CW]
http://www.bmtmicro.com/BMTCatalog/dev_clarion/xplore.html

Igor Gubin

unread,
Jun 27, 2001, 8:34:49 AM6/27/01
to
Use CGILib

You can see samples on www.metaldataonline.com (Demo Program)

Regards
Igor Gubin

"Brian Staff" <brianstaff@[NoSpam]compuserve.com> ???????/???????? ? ???????? ?????????:
news:VA.0000039...@staffb.phx.jda.com...

0 new messages