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 12.10 安装 jdk-7u10-linux-x64.tar.gz(转载)
    Android-- FragmentStatePagerAdapter分页(转载)
    Windows下安装Cygwin及包管理器apt-cyg(转)
    Androidi性能优化之多线程和同步
    Androidi性能优化之高效使用内存
    综合面试---常问知识点
    路由器
    域名系统
    IP地址与子网掩码
    网络层使用的协议
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2761591.html
Copyright © 2011-2022 走看看