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);

                 }

             }

         }

     

    }

  • 相关阅读:
    弹框在UC浏览器或者Android机器上会被顶上去
    移动端性能优化
    当placeholder的字体大小跟input大小不一致,placeholder垂直居中
    Chrome下面查看placeholder的样式
    js 高级程序设计(笔记)
    SpringBoot自定义配置步骤
    二叉树的下一个节点
    输入某二叉树的前序遍历和中序遍历的结果,重建出该二叉树
    kafka配置记录
    Builder模式
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2761591.html
Copyright © 2011-2022 走看看