delphi clientdataset open卡住了
str1 := 'select khmch,hyh,hh,bh,mxbh,gpjsrq,cf,sum(isnull(wtr,0)) as trzl ';
str1 :=str1+' from htyrerp01' + curgsbh +'..JHB_ztrjhysmx ';
str1 :=str1+' where (gsbh=''' + curgsbh + ''')';
if trim(Edit1.Text)<>'' then
str1:=str1+' and (gpjsrq>='''+Edit1.Text+''') ';
if trim(Edit2.Text)<>'' then
str1:=str1+' and (gpjsrq<='''+Edit2.Text+''') ';
if trim(Edit3.Text)<>'' then
str1:=str1+' and (rsjsrq>='''+Edit3.Text+''') ';
if trim(Edit4.Text)<>'' then
str1:=str1+' and (rsjsrq<='''+Edit4.Text+''') ';
if trim(Edit5.Text)<>'' then
str1:=str1+' and (a.khmch='''+Edit5.Text+''') ';
str1 := str1 + ' group by khmch,hyh,hh,bh,mxbh,gpjsrq,cf ';
query1.Close;
query1.CommandText := str1;
query1.Open;
query1.first;
调试到 query1.Open;卡住了,没有任何报错,程序死掉了,这是为什么,急求