BusinessEntityDesigner DataAccess Compile Error
 
Forums / SmartComponent Library - Developer Forum / BusinessEntityDesigner DataAccess Compile Error

BusinessEntityDesigner DataAccess Compile Error

5 posts, 2 answered
  1. Sascha Zehringer
    Sascha Zehringer avatar
    6 posts
    Registered:
    28 Oct 2022
    15 Nov 2022
    Link to this post
    Whenever we're generating or regenerating a BusinessEntity with the BuisnessEntityDesigner (12.2.4), it puts two lines of code in the connected "DataAccess" class, which is causing compile errors under Linux.
    The two lines are the following:

    ASSIGN THIS-OBJECT:SourceTableNames = "TABLE_NAME":U
                 THIS-OBJECT:SourceBufferNames = "TABLE_NAME":U .

    The Error occures, while compiling under Progress version 11.6.4 as well as 12.2.4.
    The error says, that it could not find "SourceTableNames" in the "DataAccess" class.
    The Exact Error look like this (with example names):

    [PCTCompile] Error compiling file 'Path/To/BusinessEntityDataAccess.cls' ...
    [PCTCompile]  ... in main file at line 74 column 9
    [PCTCompile]          ASSIGN THIS-OBJECT:SourceTableNames  = "TABLE_NAME":U
    [PCTCompile] ---------^
    [PCTCompile] Element 'SourceTableNames' konnte nicht in Klasse 'Path.To.BusinessEntityDataAccess' gefunden werden. (12927)
    [PCTCompile] ** Path/To/BusinessEntityDataAccess.cls Kann Zeile 74 nicht verstehen. (196)

    Is might there be something we're missing here? Maybe we got some wrong setting?

    Thanks in advance.





    Last modified on 15 Nov 2022 08:11 by Sascha Zehringer
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    15 Nov 2022 in reply to Sascha Zehringer
    Link to this post
    Those properties have been introduced to Consultingwerk\OERA\DataAccess.cls in August 2021.

    My guess is that on Windows you are using a pretty recent release of the SmartComponent Library to generate the Business Entities and Data Access classes - but no Linux you have an older version of the framework that you compile against (source code or r-code) and hence the property is not known in the base class.
  3. Sascha Zehringer
    Sascha Zehringer avatar
    6 posts
    Registered:
    28 Oct 2022
    15 Nov 2022
    Link to this post
    Under Windows and Linux with Progress Version 12.2 this schouldn't be a Problem, because our Version of the SCL is from 3 Months. The 11.6 Version uses an older SCL which should be from 2019/2020. 

    And with 12.2 I saw a problem in the pipeline, which caused to compile our new code with the old SCL. I fixed that.
    So now the Linux compile with 11.6 is just the one, thats not compiling, because we use the older SCL there.
    But can I somehow add custom lines to the generation? Like this:
    "
    &IF PROVERSION GE "12" &THEN
    ASSIGN THIS-OBJECT:SourceTableNames  = "TABLE_NAME":U
                 THIS-OBJECT:SourceBufferNames = "TABLE_NAME":U .
    &ENDIF
    "

    I mean I could add this every time, but not everyone here is aware of this problem. 
      
    Last modified on 15 Nov 2022 14:11 by Sascha Zehringer
  4. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    15 Nov 2022 in reply to Sascha Zehringer
    Link to this post
    As you're 11.6 version of the framework won't be updated anymore, I'd rather add the property definition to the 11.6 version of the Consultingwerk\OERA\DataAccess.cls.

    The addition of the conditional compilation would require to build an extended version of the BusinessEntityDesigner class and overriding this method:

        /**
         * Purpose: Returns the source code that assigns the SourceBufferNames
         *          and SourceTableNames properties
         * Notes:
         * @return The source code that assigns the SourceBufferNames and SourceTableNames properties
         */
        METHOD PROTECTED LONGCHAR GenerateAssignSourceBufferAndTables ():


    That seems like more effort to me. 
  5. Sascha Zehringer
    Sascha Zehringer avatar
    6 posts
    Registered:
    28 Oct 2022
    Answered
    17 Nov 2022
    Link to this post
    As you suggested the easier way was to add those Properties to the old SCL. 
    That works for us. 

    Thank you.
5 posts, 2 answered