Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.03.25;
Скачать: CL | DM;

Вниз

New Table   Найти похожие ветки 

 
sniknik ©   (2002-02-25 23:16) [3]

Пример

{
As we know, Paradox Tables consist in a table file and some corresponding index files
there are many way to copy them:
1. Using TBatchMover (at DataAccess Pallete) with Mode : BatCopy
But you can"t copy the tables corresponding index files, TBatchMove just
copies the structure and data.
2. Using FileCopy
But you can"t copy the tables corresponding index files automatically,
you should define each files
.. and many more

The Simple way is:

Put two TTables on your form, name it as tbSource and tbTarget.
Then, put this procedure under implementation area
}

type
TForm1 = class(TForm)
tbSource: TTable;
tbTarget: TTable;
// ...
end;

implementation

procedure TForm1.Button1Click(Sender: TObject);
begin
tbSource.TableName := "Source.DB"; // The name of your tables which you want to copy from
tbTarget.TableName := "Target.DB"; // The name of your tables which you will to copy to
// You Can set the tbSource.DataBaseName to an existing path/Alias
// where you store your DB
// You Can set the tbTarget.DataBaseName to an existing path/Alias
// where you want to store the duplicate DB
tbSource.StoreDefs := True;
tbTarget.StoreDefs := True;
tbSource.FieldDefs.Update;
tbSource.IndexDefs.Update;
tbTarget.FieldDefs := tbSource.FieldDefs;
tbTarget.IndexDefs := tbSource.IndexDefs;
tbTarget.CreateTable;
//Actually you can set these code up to only 5 lines :)
end;


End.



Страницы: 1 вся ветка

Текущий архив: 2002.03.25;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.007 c
4-80720
Cranium
2002-01-25 01:47
2002.03.25
Как с помощью API под Windows 2000 server писать в LPT?


1-80589
igorr
2002-03-11 03:09
2002.03.25
Как спозиционировать InputBox или InputQuery?


1-80598
DeNNiss
2002-03-11 09:24
2002.03.25
Уважаемые Мастера!


1-80565
Kalaha
2002-03-09 07:41
2002.03.25
Регистр


4-80716
FLASH !
2002-01-25 14:28
2002.03.25
WINDOWS 9x РЕЕСТР !!!!