• Creator
    Topic
  • #4229
    lp_irovetz
    Participant

      Hi Formativ team,

      Is there a way to open a ‘global’ ADO Session.
      These ADO object could be open at the GroupWise Startup and be call in every Applets.

      I need to Roll Eyes
      – Retreve some record in an Oracle base
      – Work with a MySql base for my applets

      Open 2 ADO session at every Applet Launch is time and code consuming

      Thanks for your help.

      L.P. Irovetz
      Arcane GroupWare

    • Author
      Replies
    • #7549
      Support 1
      Participant

        Dear L.P.,

        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.

        Regards,
        Advansys Support

      Viewing 1 replies (of 1 total)
      • You must be logged in to reply to this topic.