Updating individual objects to the database

BoldSystemHandle has an UpdateDatabase method for all objects, but how do you update individual objects?

procedure UpdateDatabaseWithObjects(Objects: array of TBoldObject; System: TBoldSystem);

var

  I: Integer;

  ObjectList: TBoldObjectList;

begin

  if not Assigned(System) then

    System := TBoldSystem.DefaultSystem;

  ObjectList := TBoldObjectList.Create;

  try

    for I := Low(Objects) to High(Objects) do

      ObjectList.Add(Objects[I]);

    if ObjectList.Count > 0 then

      System.UpdateDataBaseWithList(ObjectList);

  finally

    ObjectList.Free;

  end;

end;



Information provided by Eric Holton http://www.holtonsytems.com

 

Share this article!

Follow us!

Find more helpful articles: