Lade...
 

Database Utility Object (Beispiele)

InstantView® & Database Utility Object (CX_DB_UTILITY)

// get CX_DB_UTILITY object 

    Var(dbUtil)

    GetManager(OBJECT) Call(GetDBUtility) -> dbUtil

// show results of OSVERIFYDB.exe

    "verify.log" dbUtil Call(ImportVerifyDBLog) FillObox(, objects)

// show corrupt objects found by CXCOSR.EXE -A ...

    "errors.lst" 5, 6, 80  285, 286 dbUtil Call(GetCorruptObjectsEx) FillObox(, objects)

    . . .

    ObjectList(objects, VIEW_ONLY, DRAG_COPY, ITEM(, 13), 1, 1, 100, 10)
    [
      Define(ErrorMsg)
        dbUtil Call(ErrorMsg);

      INITIALIZE: "CX_CLASS::call(ErrorMsg)" COLOR LIGHTRED SetFormat

                  "CX_CLASS::this" COLOR BLUE, 0 6 SetFormat
    ]

 

// show objects with checksum differences

    Item("New Database")
    [
      SELECT: BeginTXN
             

"objects.new" 1 dbUtil Call(GetObjectsWithChecksumDifference) FillObox(, objects)

              "Database (new)" PutValue(win)
    ]
    Item("Old Database")
    [
      SELECT: BeginTXN
             

"objects.new" 0 dbUtil Call(GetObjectsWithChecksumDifference) FillObox(, objects)

              "Database (old)" PutValue(win)
    ]

         .  .  .

    ObjectList(objects, AUTO_POSITION, VIEW_ONLY, DRAG_COPY, 1, 1, 100, 10)
    [

      DOUBLE_CLICK: // show detailed checksum for every data field

                     GetObject SendMsg(VIEW_DETAILS) 
    ]

    ObjectList(details, AUTO_POSITION, VIEW_ONLY, ACCEPT_DROP, 1, 1, 100, 10)
    [
      VIEW_DEAILS: ClearObox

                   dbUtil Call(CheckSum) FillObox
    ]

// remove object from root entry point collection / salesCondition(set)

    Var(tmp)
    "salesCondition" -> tmp
    tmp "<0| 214 | 1162c>" GrabObject test Call(RemoveFromREPCollection)

InstantView®