Поддержка / Donate
 

WebMoney

Яндекс.Деньги

SMS.Копилка
Деньги@Mail.ru
Rupay
E-gold
PayPal

 

Благодарю за поддержку!

Лента RSS - Новости сайта Новости сайта
Лента RSS - Новости форума Новости форума
Добавить в закладки и поделиться Bookmark and Share

 

Архив исходников

 


Automatic translation

 
English German French
Italian Spanish Portuguese
Greece Japan Chinese
  Korean  

  

 

  Форум  

Delphi FAQ - Часто задаваемые вопросы

| Базы данных | Графика и Игры | Интернет и Сети | Компоненты и Классы | Мультимедиа |
| ОС и Железо | Программа и Интерфейс | Рабочий стол | Синтаксис | Технологии | Файловая система |



Google  
 

Дублируем TTable со всеми индексами


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; 
end;




Источник - Проект "Delphi World" © Выпуск 2002 - 2004
Автор проекта: Акулов Николай



   Rambler's Top100             Яндекс цитирования