Appserver app to connect to different db.

Posted by OctavioOlguin on 24-Apr-2015 19:05

I have my appserver application conected to a datawarehouse db, but once for a long while, I need that app to get a record from the daily (production) db, just one record.  As I don't need/want the appserver to connect to daily db (licensing and performance purposes) I came to this algorithm, that proved wrong:

1) client calls app1 on appserver

2) app1 calls utility procedure connectdb.

3) app1 fetchs form daily db, the record needed by client and returns to client.

4) app1 disconnects from daily db.

of course I compiled app1 on proyect connected to  daily (production) schema, and put on apserver...

But when client calls app1, appserver complains about daily db disconnected....

I'll transform to

1) client calls app1.

2) app1 connects and calls app2 with same parameters it go from client, app2 in turn fetchs and returns the record.

3) app1 gets returned params from app2, and loads on return param for app1, so client receives record..

is it ok?

(hoped to find some solid algorithm..)

thaks...

All Replies

Posted by OctavioOlguin on 24-Apr-2015 19:37

so far, the second algorithm works...

Posted by Garry Hall on 27-Apr-2015 09:57

If I understand your post correctly, your first post is saying that you have an ABL procedure that:

- calls a utility procedure to connect daily db

- extracts data from daily db

- disconnects from daily db

In order to run an ABL program, you need to be connected to all databases that it references before the program starts. Your second algorithm is correct: it connects the appserver to the database first, then calls another program with has the database references.

This thread is closed