CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  数据库相关

请教有关查询语句.出现Missing SQL property错误~~

楼主fleag()2006-05-03 21:05:35 在 Delphi / 数据库相关 提问

相关代码如下:  
  procedure   Tcx_Form.SpeedButton4Click(Sender:   TObject);  
  begin  
    if   (Trim(combobox3.Text)='')   or   (Trim(edit2.Text)='')   or     (Trim(combobox4.Text)='')   then  
        begin  
          Application.MessageBox('请设置查询条件.','提示',64);  
          Exit;  
        end  
   
    else  
            begin  
              with   DM.GZQuery   do  
                begin  
                    close;  
                    SQL.clear;  
                    if   combobox3.ItemIndex=0   then  
                        begin  
                              if     combobox4.ItemIndex=0   then  
                                    begin  
                                        SQL.add('   select   *   from   gztj   where   故障名称     =   '+   QuotedStr(Trim(edit1.Text))   +'   ');  
                                    end  
                              else   if     combobox4.ItemIndex=1   then  
                                    begin  
                                        SQL.add('   select   *   from   gztj   where   故障名称     like     '+   QuotedStr(Trim(edit1.Text))   +'   ');  
                                    end;  
                            end  
                else   if   combobox3.ItemIndex=1   then  
                      begin  
                            if   combobox4.ItemIndex=0   then  
                                    begin  
                                        SQL.add('   select   *   from   gztj   where   故障现象     =   '+   QuotedStr(Trim(edit1.Text))   +'   ');  
                                    end  
                            else   if   combobox4.ItemIndex=1   then  
                                    begin  
                                        SQL.add('   select   *   from   gztj   where   故障现象     like     '+   QuotedStr(Trim(edit1.Text))   +'   ');  
                                    end;  
                        end  
   
                else   if   combobox3.ItemIndex=2   then  
                    begin  
                            if     combobox4.ItemIndex=0   then  
                                    begin  
                                        SQL.add('   select   *   from   gztj   where   故障类型     =   '+   QuotedStr(Trim(edit1.Text))   +'   ');  
                                    end  
                            else   if     combobox2.ItemIndex=1   then  
                                    begin  
                                        SQL.add('   select   *   from   gztj   where   故障类型     like     '+   QuotedStr(Trim(edit1.Text))   +'   ');  
                                    end;  
                    end;  
                    Open;  
                end;  
                      if   DM.GZQuery.RecordCount>0   then  
                          begin  
                            DM.GZDSc.DataSet   :=   DM.GZQuery;  
                            dbGrid2.DataSource   :=   DM.GZDSc;  
                          end  
                      else  
                          begin  
                              DM.GZQuery.Close;  
                              Application.MessageBox('没有找到符合条件的数据.','提示',64);  
                          end;  
   
      end;  
  end;  
   
  运行时出现提示说   GZQuery   Missing   SQL   property!我怎么检查也找不出问题!请大家帮忙看看,谢谢了! 问题点数:0、回复次数:1Top

1 楼li_zhen028()回复于 2006-05-04 15:43:24 得分 0

'select   *   from   gztj   where   故障类型     =   '''+   QuotedStr(Trim(edit1.Text))+''''    
    你没给分是没人会回答你的,碰上我心情好Top

相关问题

关键词

得分解答快速导航

  • 帖主:fleag

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo