View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
The trick is to instanciate the object in fw_enter.prg.  However, you must take into account the following issues:

1. Variables declared in fw_enter.prg are lost as soon as fw_enter.prg is done executing.  If you want these variables to be available in scripts (and between requests) you must declare them as PUBLIC.
2. FoxWeb executes fw_enter.prg before EACH hit.  You should add code which only creates the object if it does not already exist.

Here's some sample code:

IF TYPE('M.MyObject') = 'U'
MyObject = CREATEOBJECT(ClassName)

FoxWeb Support Team

Sent by Julio Geng on 11/29/2001 04:58:10 PM:
I use a com object to access an airline reservations system.  It works fine, but I am wondering if there a way to load this object with the foxpro channels, so I don't need to call the object in every single request.  This will speed up the process.  In every request I need to allocate a terminal address and do a sign on; just this process takes at least 6-10 seconds.

Any suggestions will be great appreciated.