2009. november 3., kedd

How to convert a Paradox table to a fixed length ASCII table


Problem/Question/Abstract:

How to convert a Paradox table to a fixed length ASCII table

Answer:

procedure TForm1.Button1Click(Sender: TObject);
var
  t1, t2: TTable; {t1 = PW table; t2 = ASCII version}
begin
  t1 := TTable.create(self);
  with t1 do
  begin
    DataBaseName := 'pw'; { Personal Alias for Paradox Directory }
    tableName := 'customer.db'; { Source Table }
    open;
  end;
  t2 := TTable.create(self);
  with t2 do
  begin
    DataBaseName := 'pw'; { Personal Alias for Paradox Directory }
    tableName := 'asdf.txt';
    TableType := ttASCII;
    createTable;
    open;
    edit;
    BatchMove(t1, batCopy);
    close;
  end;
  t1.close;
end;

Nincsenek megjegyzések:

Megjegyzés küldése