|
Building a Midas server step by step guide
Building an application that is intended to be used as a MIDAS (Multi-tier Distributed Application Services) Server is actually building a server side for a
Remote Dataset such as TClientDataSet.
This example describes how to create a simple server for Delphi 3.0 C/S. Just take following steps:
- Start a new application with File, New Application.
- Add the components such a gifimages and set the Captions etc. to the form as you would do to any form.
- Add a Remote DataModule with File, New,
Remote Data Module. Give it a class name such as MidasDemo in the simple Midas Server example and set the Instancing to
Multiple instance.
- On the Remote DataModule (called MidasDemo) add the components TQuery and TProvider (Data Access on component Bar).
- Set the Dataset property of the TProvider object (Provider1) to the TQuery object (Query1).
- Right click on Provider1 and choose Export Provider1 form datamodule to create a method for accessing Provider1 from a remote machine.
- Save the complete project.
- Run the server to register it. When running the program DComCnfg.exe in Windows you should see that an object named MidasDemoObject is created.
- Add the Provider1.OnDataRequest event in the Object Inspector.
- Insert the necessary code in the function TMidasDemo.Provider1DataRequest like below.
- Build the clients as described in the Midas connection in ISAPI DLL example as in the Midas connection as a windows application example.
- Distribute the so called thin clients to the workstation together with the DBClient.dll file. This file is necessary to establish a
connection to the server.
When distributing the server application to another server remember to run it once to register it. Also the clients must be changed of course.
|
|