此句应该有错误:
  sql.add('select * from e_basic where ecode=combobox1.text');
不妨改为:
  sql.add('select * from e_basic where ecode='+QuotedStr(combobox1.text);由于上述SQL语句有误,所以SQL返回集为空,则自然而然地
edit1.text:=fieldbyname('ename').asstring;   语句执行也不成功。  试试吧!

解决方案 »

  1.   

    嗯,可以了,你能帮我说说quotedstr是什么函数吗?谢谢。
      

  2.   

    if e文=good then
       查help
    else begin
       open 金山词霸;
       查help; // help中有许多的确值得看的东东    
    end;
       
      

  3.   

    sql.add('select * from e_basic where ecode='+QuotedStr(combobox1.text);不用QuotedStr也应该可以。QuotedStr应该称为引号字符串,与它相对的还有control string叫控制符字符串,如#13#10即为回车换行符,又如#89#111#117为'You'。