问题是这样的  我要从数据库里面得到一个数据里面的内容是
a,b,c这三个代号(不能改为其他字符)
当我取到a时  ComboBox1.Text:='a-暂停【系统质疑】';
当我取到b时  ComboBox1.Text:='b-暂停【有人纠错】';
当我取到c时  ComboBox1.Text:='c-暂停【未录入完】';
case  SimpleDataSet1.FieldByName('pathSh').AsInteger of //审核流程
    97: ComboBox1.Text:='a-暂停【系统质疑】';
    98: ComboBox1.Text:='b-暂停【有人纠错】';
    99: ComboBox1.Text:='c-暂停【未录入完】';
end;系统老是报错加红的地方该怎么写我是菜鸟对Delphi不太懂。。急非常感谢跪谢

解决方案 »

  1.   

    加红的改为:ord(SimpleDataSet1.FieldByName('pathSh').AsInteger)
      

  2.   

    如果我数据库里面记录是a
    那么错误提示是:  'a' is not a valid integer value....
      

  3.   

    ord(SimpleDataSet1.FieldByName('pathSh').AsInteger)
      

  4.   

    var
      flowStep: integer;
    begin
    ...
    flowStep := StrToInt('$'+SimpleDataSet1.FieldByName('pathSh').AsString);
    ...
    case flowStep of   //审核流程
      $a: ComboBox1.Text:='a-暂停【系统质疑】';
      $b: ComboBox1.Text:='b-暂停【有人纠错】';
      $c: ComboBox1.Text:='c-暂停【未录入完】';
    end; 
      

  5.   

    ord(SimpleDataSet1.FieldByName('pathSh').AsInteger)
    这个效果 和刚才的是一样的
      

  6.   

    lynmison 的完全有效呵呵 非常感谢
    不过我不懂这里面加 $ 具体是什么意思。。有点不懂。
    谢谢指教。
      

  7.   

    ord(SimpleDataSet1.FieldByName('pathSh').AsString)
    是这样的吧?