if Query1.FieldByName('name').DataType=ftstring then
query1.SQLAdd(' where '+combobox1.Text+' = '+quotedstr(edit1.Text));
报错,name找不到,数据库没错?

解决方案 »

  1.   

    query1中的语句中的SELECT 部分有name吗?
      

  2.   

    前面是否有Query.Active:=true;把代码写全
      

  3.   

    字段名最好不要用name,可能是保留字
      

  4.   

    if Query1.FieldByName(combobox1).DataType=ftstring then
    query1.SQLAdd(' where '+combobox1.Text+' = '+quotedstr(edit1.Text));
    灵活形是这个,上面是调试中过程?
      

  5.   

    if Query1.FieldByName(combobox1).DataType=ftstring then
    query1.SQLAdd(' where '+combobox1.Text+' = '+quotedstr(edit1.Text));
    灵活形是这个,上面是调试中过程?
    帮找一下错