GServerController.SessionTimeout := 600;
  WebApplication.SessionTimeOut := 600;
  ADataSet.CommandTimeout := 60;
这三个都分别(并存)设置过了,都不行,不知还有什么地方要注意的,数据不多,只要30条记录,查询数据都返回了,但界面上的图标出现了X号,再点击按钮事件就提示超时了,请高手帮忙!

解决方案 »

  1.   

    补充:查询代码如下:
     Result := False;
      TotalStr.Clear;
      Str := 'Select * from EventLog where [EventTime] Between :BeginDate and :EndDate';
      S := '';
      if FSearch.SIP<>'全部' then
         Str := Str + ' and SrcIP like' + #39 +  FSearch.Sip + #39;                //IP地址
      if FSearch.SKind<>'全部' then
         Str := Str + ' and PlugIn=' + #39 + FSearch.SKind + #39;                  //过滤类型  if FSearch.SAction <> '全部' then
      begin
         if FSearch.SAction = '通过' then
            Str := Str + ' and (Act=' + IntToStr(AC_PASS_RECORD) + ' Or Act= ' + IntToStr(AC_PASS_SAVE) + ')'
         else if FSearch.SAction='拦截' then
            Str := Str + ' and (Act=' + IntToStr(AC_HOLD_RECORD) + ' Or Act= ' + IntToStr(AC_HOLD_SAVE) + ')'
         else
            Str := Str + ' and Act=' + IntToStr(AC_RESET_RECORD);
      end;  with ADataSet do
      begin
         Parameters.Clear;
         Parameters.AddParameter.Name := 'BeginDate';
         Parameters.ParamByName('BeginDate').DataType := ftDateTime;
         Parameters.AddParameter.Name := 'EndDate';
         Parameters.ParamByName('EndDate').DataType := ftDateTime;
         Parameters.ParamByName('BeginDate').Value := LoadDisTime.StartDay;
         Parameters.ParamByName('EndDate').Value := LoadDisTime.EndDay;
         Prepared :=False;
         str := Str + ' order by ID';
         CommandText := Str;     Open;
         RdCount := RecordCount;
         First;
         if RecordCount >0 then Result := True;
         While not Eof do
         begin
             Str := Fields.Fields[COL_DATE + 1].AsString + '|';                  //日         Str := Str + Fields.Fields[COL_SIP + 1].AsString + '|';           //源IP
             Str := Str + Fields.Fields[COL_DIP + 1].AsString + '|';             //目标IP
             Str := Str + Fields.Fields[COL_KIND + 1].AsString + '|';            //功能插件
             case (Fields.Fields[COL_ACTION + 1].AsInteger and $7) of
                 0: S := '通过';
                 1, 4: S := '拦截';
                 2: S := '断开';
                 3: S := '替换';
             end;
             Str := Str + S + '|';
             Str := Str + Fields.Fields[COL_CONTENT + 1].AsString + '|';  //描述
             Str := Str + Fields.Fields[COL_RES + 1].AsString;       //其它         TotalStr.Append(Str);
             Next;
         end;  //while
         Close;
      end;     //with