DB and Appservers

Posted by Elsworth Burmeister on 14-Dec-2015 07:59

OE 11.3

 

Our database has a openedge auto connect listing of at least 1 other DB. I have a webclient application with an appserver (stateless) that points to the main DB, for some reason when running the .r that contains tables from both db's it fails with the following errors.

 

Unknown database name <dbname>. (855)

Unknown or ambiguous table <tablename>. (725)

 

Ive tried prefixing the tables and still the same result.

 

If I put this in some other programs appserver code that does not use the second DB it only always displays the main DB.

 

DEFINE VARIABLE ix AS INTEGER NO-UNDO.

 

REPEAT ix = 1 TO NUM-DBS:

   MESSAGE "db name" LDBNAME(ix) "|" DBRESTRICTIONS(ix).

END.

 

Then above code for a CHUI session shows the 2 DB's connected.

 

Is there someone that can point me in the correct direction as to how to solve this. It is obvious that the appserver is not getting the second DB how do I go about getting it?

 

TIA

All Replies

Posted by Ramadevi Dhavala on 14-Dec-2015 08:52

Hi,

Such type of errors will be seen, if the project is using multiple databases with same table names. To resolve this, we have to use the database names to access the particular table.

Example:

Code for first database:

FOR EACH testDB1.Customer :

 DISPLAY testDB1.Customer.CustNum .

END.

Code for second database:

FOR EACH testDB2.Customer :

 DISPLAY testDB2.Customer.CustNum .

END.

If you have already done this, please try regenerating the r-code after prefixing the table names with database names.  

Thanks & Regards,

Rama

Posted by Fernando Souza on 14-Dec-2015 08:56

The auto-connect db feature should work fine with the AppServer.

If you are getting those 2 errors, then you are not running the r-code. Those error come up during compilation and the auto-connect db feature will only work when running r-code. So you should check that you are actually running r-code on the AppServer.

Posted by Elsworth Burmeister on 14-Dec-2015 08:57

Hi
 
Thanks but the name of the table used in the second table is not used in the first. it is unique to that particular DB.
 
 
 

Elsworth Burmeister

Developer - Managed Services

Cell: +27 83 777 3072 Email: eburmeister@elcb.co.za

 

ELCB Information Services (Pty) Ltd

Customer Service Email  elcb@elcb.co.za · www.elcb.co.za

E A S T  L O N D O N

Tel: +27(43)  704 0700

Fax: +27(43) 704 0701

J O H A N N E S B U R G

Tel: +27(10) 035 0310

Fax: +27(10) 035 0311

P O R T  E L I Z A B E T H

Tel: +27(41) 373 0529

Fax: +27(86) 650 0135

Disclaimer


Posted by Elsworth Burmeister on 15-Dec-2015 00:35

Thanks it appears i was not pointing to the r-code, once i changed my appserver to point to this it worked fine.

Thanks allot....

This thread is closed