Consultor Eletrônico



Kbase P133816: Generated class runner program needs explicit reference
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/1/2009
Status: Verified

SYMPTOM(s):

Generated class runner program needs explicit reference

** <field> is ambiguous with <table>.<field> and <table>.<field> (72)

** Application is ambiguous with <table>.Application and <table>.Application (72)

Field '<Arg1>' is ambiguous with '<Arg2>.<Arg3>.<Arg4>' and '<Arg5>'. (14597)

FACT(s) (Environment):

Windows 32 Intel
OpenEdge 10.2A

CAUSE:

Bug# OE00172532

CAUSE:

When running a Form from Architect, a temporary program is generated as sort of a sample bootstrap to instantiate and run the form. In the code, the WAIT-FOR uses the Application class in System.Windows.Forms.Application. The reference is relative using the USING statement: Example: USING System.Windows.Forms.Applicaiton. This is done so that the WAIT-FOR need only reference the class: Example: WAIT-FOR Application:Run (rTemp). This may result in ambiguity problems when connected to a database with tables or fields named "Application".

FIX:

Write your own runner program to instantiate forms or rename the Application field in the schema to something else. Example:
DEFINE VARIABLE oTemp AS <ObjectReference> NO-UNDO. DO ON ERROR UNDO, LEAVE
ON ENDKEY UNDO, LEAVE
ON STOP UNDO, LEAVE
ON QUIT UNDO, LEAVE:
oTemp = NEW <objectname>( ) . WAIT-FOR System.Windows.Forms.Application:Run (oTemp).
END. IF VALID-OBJECT(oTemp) THEN
DELETE OBJECT oTemp NO-ERROR.

FIX:

Upgrade to OpenEdge Release 10.2A