Копирование таблицы с помощью DBE

Материал из DRKB

Копирование таблицы с помощью DBE[править | править код]

function CopyTable(tbl: TTable; dest: string): boolean;
var
  psrc, pdest: array[0..DBIMAXTBLNAMELEN] of char;
  rslt: DBIResult;
begin
  Result := False;
  StrPCopy(pdest, dest);
  with tbl do
  begin
    try
      DisableControls;
      StrPCopy(psrc, TableName);
      rslt := DbiCopyTable(DBHandle, True, psrc, nil, pdest);
      Result := (rslt = 0);
    finally
      Refresh;
      EnableControls;
    end;
  end;
end;



Source: Взято с http://delphiworld.narod.ru
ID: 02597