Home > Back-end >  Delphi clientdataset got stuck in the open
Delphi clientdataset got stuck in the open

Time:09-19

Str1:='select KHMCH hyh, hh, bh, MXBH, GPJSRQ, cf, sum (isnull (WTR, 0)) as TRZL';
The str1: str1=+ 'from htyrerp01' + curgsbh + '.. JHB_ztrjhysmx ';
Str1:=str1 + 'where (GSBH=' + curgsbh + ' ' ' ' ') '.
If the trim (Edit1. Text) & lt;> "' then
The str1: str1=+ 'and (gpjsrq>="' + Edit1. Text + ' ' ');
If the trim (Edit2. Text) & lt;> "' then
The str1: str1=+ 'and (gpjsrq<+ Edit2. Text +=' ' ' ' ' ');
If the trim (Edit3. Text) & lt;> "' then
The str1: str1=+ 'and (rsjsrq>="' + Edit3. Text + ' ' ');
If the trim (Edit4. Text) & lt;> "' then
The str1: str1=+ 'and (rsjsrq<="' + Edit4) Text + ' ' ');
If the trim (Edit5. Text) & lt;> "' then
Str1: str1=+ 'and (a.k HMCH="' + Edit5. Text + ') '.
The str1: str1=+ 'group by KHMCH, hyh, hh, bh, MXBH, GPJSRQ, cf';
Query1. Close;
Query1.Com mandText:=str1;
Query1. Open;
Query1. First;

Debug the query1. Open; Stuck, no error, the program died, this is why, for urgent

CodePudding user response:

No error should be have not finished the query, the SQL statement looks more time-consuming, output of SQL statements, performed in query analyzer, look wrong, need how long can the result,
  • Related