Consultor Eletrônico



Kbase 20942: Error 425 Having 2 Tables With Same Name from 2 Databases
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
SUMMARY:

If the application that you are developing is connected to two databases that have tables with the same name, you can encounter the following error:

Table <table> is in database <db name> and <db name>
(425)

when you try to compile or run the application if it contains a browser or a SmartDataObject (SDO) against one of the tables with a duplicate name.

EXPLANATION:

The error occurs because the AppBuilder by default does not include the database name in the preprocessor definitions when it creates a browser or GUI SDO.

The following piece of code is an example of what preprocessor statements are included in the code when a browser is created:

/* Definitions for BROWSE BROWSE-2
*/
&Scoped-define FIELDS-IN-QUERY-BROWSE-2 Customer.Address
Customer.Address2 Customer.Balance Customer.City Customer.Comments
&Scoped-define ENABLED-FIELDS-IN-QUERY-BROWSE-2
&Scoped-define OPEN-QUERY-BROWSE-2 OPEN QUERY BROWSE-2 FOR EACH
Customer NO-LOCK INDEXED-REPOSITION.
&Scoped-define TABLES-IN-QUERY-BROWSE-2 Customer
&Scoped-define FIRST-TABLE-IN-QUERY-BROWSE-2 Customer

/****************************************************/

As you can see, by default there is no database written in the definitions.

SOLUTION:

To end the error, follow these steps:

1) Go to the Application builder in the "Options" menu.

2) Select "Preferences".

3) Click the "Quality Database Fields with a Database Name"
option in the General tag.

After you do this, you can see that the name of the database is added to all the fields in the source code.