Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. Add the SelfHdl fields to the database:

  2. The following sample runs a Progress client to generate two .DF files in the <DBPath> folder


    Replace the <DBPath> with the path where your database resides.

    Replace the <DBName> with your physical database name

    Replace the <PathTo> with the folder where your Swat framework is


    prowin -rr -db <DBPath>\<DBName> -1 -p <PathTo>\app\ofr-backend\pCrm\src\tools\addSelfHdlToTables.p -T <DBPath> -param "<DBName>"


    This generates a file addSelfHdl_<DBName>.df and addSelfHdl_<DBName>_Idx.df file.
  3.  

Import first the addSelfHdl_<DBName>.df schema file. This will add a SelfHdl field to each table. And then import the addSeelfHdl_<DBNAme>_Idx.df which will set a unique index on the selfhdl field.


2. Connect the database from OpenEdge Developer Studio, which is configured to the SWAT framework.

Run from Scratchpad :

RUN Akioma/Swat/Util/buildTableDefinitionFile.p("", "D:/temp/target.xml", "<DBName>", ?).

This script generates a Dataset XML file, which contains the tablenames of the database but with extra information for the swat framework.

This data needs to be present in the zTable database table of the SWAT framework. 

RUN Akioma/Swat/Util/ImportTableDefinitionFile.p("D:/temp/target.xml").

Will import the dataset to the database.


3. In the last step generate unique ID's for SelfHdl fields:

RUN Akioma/Swat/Tools/fillselfhdl.p ("d:/temp/target.xml", "*", "<DBName>").

This script runs through all tables which are defined in the target.xml file and generates for each record a unique ID. This is a character of 36 bytes, example 1ET:a6e06d912fb315bc7114285ef8eb725c