باز کردن و بستن تمامی dataset های موجود در Form

تابع باز کردن تمامی Dataset ها

{ Open datasets: OpenDataSet(MyForm); }

procedure OpenDataSet(FormName: TForm);
var
  I: Integer;
begin
  for I := FormName.ComponentCount - 1 downto 0 do
    if (FormName.Components[I] is TADOTable) then
    begin
      (FormName.Components[I] as TADOTable).Open;
    end;
end;

تابع بستن تمامی Dataset ها

{Close datasets: CloseDataSet(MyForm);  }

procedure CloseDataSet(FormName: TForm);
var
  I: Integer;
begin
  for I := FormName.ComponentCount - 1 downto 0 do
    if (FormName.Components[I] is TADOTable) then
    begin
      (FormName.Components[I] as TADOTable).Close;
    end;
end;
{amir}
این نوشته در Delphi ارسال شده است. افزودن پیوند یکتا به علاقه‌مندی‌ها.

46 دیدگاه دربارهٔ «باز کردن و بستن تمامی dataset های موجود در Form»

  1. Priest می‌گوید:

    That’s really srhewd! Good to see the logic set out so well.

  2. Jalen می‌گوید:

    It’s spkooy how clever some ppl are. Thanks!

  3. cruises from baltimore می‌گوید:

    Do you have a spam issue on this blog; I also am a blogger, and I was wanting to know your situation; many of us have created some nice procedures and we are looking to swap techniques with others, be sure to shoot me an e-mail if interested.

  4. Lala می‌گوید:

    Fidnnig this post has solved my problem

  5. Zach می‌گوید:

    Taking the overivew, this post is first class

  6. Wade Nickelson می‌گوید:

    likes is quite easy, you should not avoid above steps and save your Facebook Page Likes. Also check out Here you can check how to divert your Facebook Webpage traffic to you Web page Connect with TricksWindow on

دیدگاه‌ها غیرفعال هستند.