zoukankan      html  css  js  c++  java
  • 查找某个表的特定RECID行的主索引字段值

    static void FindPrimaryIdx(Args _args)

    {

         DictTable       dt;

         DictIndex       di;

         Common          cm;

         IndexID         idx;

         int             i, iCnt;

         FieldID         fid;

         FieldID         fids[,10];

         int             fidsCnt = 0;

         str             s;

         str             sTemp;

         int _tID=175,_rID=956968;//可以修改或使用参数传递

     

         ;

         dt  = new DictTable(_tid);

         if (dt) {

             idx = dt.primaryIndex();

             if (idx) {

                 di  = dt.indexObject(idx);

                 if (di) {

                     iCnt = di.numberOfFields();

                     for (i=1;i<=iCnt;i++) {

                         fid = di.field(i);

                         if (fid) {

                             fidsCnt++;

                             fids[fidsCnt] = fid;

                         }

                     }

                 }

             }

             cm = dt.makeRecord();

             select firstonly * from cm

             where cm.RecId == _rid;

             if (cm.RecId) {

                 // 找不到记录

                 for (i=1;i<=fidscnt;i++) {

                     fid   = fids[i];

                     sTemp = strfmt('[%1]=[%2]',fieldId2Name(_tid, fid),cm.(fid));

                     if (s) s = s+',';

                     s        = s + sTemp;

                     info(s);

                 }

             }

         }

     

    }

  • 相关阅读:
    Ubuntu安装Cassandra
    Ubuntu安装中文输入法
    CoreOS, Kubernetes, etcd
    CountDownLatch, CyclicBarrier and Semaphore
    Java Primitives and Bits
    vue 和 webstorm(01) 之 基本入门 _fei
    ubuntu 命令窗口背景颜色 #300a24 _fei
    2345 看图王ad介绍----关闭广告 _fei
    PHP 使用 pdo 操作oracle数据库 报错 _fei
    PHP 使用 pdo 操作oracle数据库 报错 _fei
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2761591.html
Copyright © 2011-2022 走看看