pauloconnor
Member
Hi all,
Our company has a number of locations which each have their own database locally.
HQ have asked me to develop a report which is basically a consolidation of information held in each factory database (e.g. overview of price trends).
Each factory has an appserver I can connect to so I can write code that will work as follows:
connect factory1-appserver.
run build details on factory1-appserver (input-output ttReport).
disconnect factory1-appserver.
connect factory2-appserver.
run build details on factory2-appserver (input-output ttReport).
disconnect factory2-appserver.
connect factory3-appserver.
run build details on factory3-appserver (input-output ttReport).
disconnect factory3-appserver.
This will run and has the advantage that when finished I have full consolidated data. The disadvantage is the speed in that each query can take up to 5 minutes (and there are 6 locations to run against).
This got me looking at asynchronous appserver calls but I am unsure how this can be achieved for a couple of reasons.
- I assume that I will have define 6 seperate temp-tables and then consolidate them once all requests are complete.
- I can't see any way of dynamically connecting to the AppServers (i.e. let the user pick 3 of the 6 locations). I was hoping to hold the factory details in a database and be able to add/remove locations without the need for changing code but I am not sure if the AppServer handle can be defined dynamically. Obviously, the appserver cannot be disconnected until the asynchronous request is complete and has called it's EVENT-PROCEDURE.
Hope this makes sense - am new to asynchronous calls so any help would be appreciated.
Our company has a number of locations which each have their own database locally.
HQ have asked me to develop a report which is basically a consolidation of information held in each factory database (e.g. overview of price trends).
Each factory has an appserver I can connect to so I can write code that will work as follows:
connect factory1-appserver.
run build details on factory1-appserver (input-output ttReport).
disconnect factory1-appserver.
connect factory2-appserver.
run build details on factory2-appserver (input-output ttReport).
disconnect factory2-appserver.
connect factory3-appserver.
run build details on factory3-appserver (input-output ttReport).
disconnect factory3-appserver.
This will run and has the advantage that when finished I have full consolidated data. The disadvantage is the speed in that each query can take up to 5 minutes (and there are 6 locations to run against).
This got me looking at asynchronous appserver calls but I am unsure how this can be achieved for a couple of reasons.
- I assume that I will have define 6 seperate temp-tables and then consolidate them once all requests are complete.
- I can't see any way of dynamically connecting to the AppServers (i.e. let the user pick 3 of the 6 locations). I was hoping to hold the factory details in a database and be able to add/remove locations without the need for changing code but I am not sure if the AppServer handle can be defined dynamically. Obviously, the appserver cannot be disconnected until the asynchronous request is complete and has called it's EVENT-PROCEDURE.
Hope this makes sense - am new to asynchronous calls so any help would be appreciated.