Thank you for your enquiry below.
Formativ does not provide a mechanism for storing ‘handles’ to objects created by an applet. This means an applet cannot retrieve a ‘custom object’ at any time during a GroupWise session. In your case, the custom object would be a handle to an ADO session and/or recordset.
Here are two suggested approaches to resolving your requirement:
- Implement 2 applets, A and B:
Applet A collects and saves data to a file F in a well-defined location on the workstation, eg. Windows temporary directory or an appropriate applet-defined data directory. This might be a plain-text file containing multiple records, which are added (or modified/deleted) whenever the applet executes.
Applet B connects to the required database(s) and adds/updates records from F, then deletes F.
Of course, this approach does not provide for ‘real time’ updates to the database; applet B must be executed at suitable intervals when ‘enough’ data has been gathered.
- Implement a COM server which can be used by an applet as shown in the following example:
set oAdoHelper = GetObject("AcmeCorp.Data.Ado.AdoHelper", ) if not IsObject(oAdoHelper) then set oAdoHelper = CreateObject("AcmeCorp.Data.Ado.AdoHelper") if IsObject(oAdoHelper) then ' do stuff with database ' ... end if end if
The server will need to maintain a connection to the database(s) between requests from the applet. In addition, the server will need to remain loaded in memory for as long as any applet requires access to the database connection.
I hope this helps you.