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

Вниз

DBF в рантайм.   Найти похожие ветки 

 
Uran ©   (2003-06-02 16:48) [0]

Подскажите пожалуйста, как в Runtime создать таблицу DBF в директории исполняемого екзешника (без алиаса), с необходимым набором своих полей.
Заранее благодарен!


 
passm ©   (2003-06-02 16:59) [1]

Uran © (02.06.03 16:48)> См. TDatabase, TDatabase.DriverName, TDatabase.DatabaseName, TDatabase.Params, TTable, TTable.DatabaseName, TTable.TableType, TTablde.FieldDefs, TTable.CreateTable.


 
Rol   (2003-06-03 06:12) [2]

>Uran или компоненты Halcyon


 
needle ©   (2003-06-03 07:37) [3]

Этот пример взят из хелпа:

with Table1 do begin
Active := False;
DatabaseName := "DBDEMOS"; // Если без алиаса, убери эту строку
тогда таблица будет создана в текущей директории
TableType := ttParadox;
TableName := "CustInfo";

{ Don"t overwrite an existing table }

if not Table1.Exists then begin
{ The Table component must not be active }
{ First, describe the type of table and give }
{ it a name }
{ Next, describe the fields in the table }
with FieldDefs do begin
Clear;
with AddFieldDef do begin
Name := "Field1";
DataType := ftInteger;
Required := True;
end;
with AddFieldDef do begin

Name := "Field2";
DataType := ftString;
Size := 30;
end;
end;
{ Next, describe any indexes }
with IndexDefs do begin
Clear;
{ The 1st index has no name because it is
{ a Paradox primary key }
with AddIndexDef do begin
Name := "";
Fields := "Field1";
Options := [ixPrimary];
end;
with AddIndexDef do begin

Name := "Fld2Indx";
Fields := "Field2";
Options := [ixCaseInsensitive];
end;
end;
{ Call the CreateTable method to create the table }
CreateTable;
end;
end;

можно еще с помощью SQL - запроса "Create Table ...", что в общем случае есть самое грамотное решение



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

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

Наверх




Память: 0.47 MB
Время: 0.032 c
14-84716
KaRaT
2003-06-05 14:48
2003.06.26
manual по Бест?


6-84477
Em(022000)
2003-04-21 04:14
2003.06.26
Как установить соединение с провайдером?


14-84658
Pat
2003-06-09 23:43
2003.06.26
SoftIce: 9x -->НТ


3-83887
Fuelfire
2003-06-02 13:35
2003.06.26
Как экспортнуть данные из таблицы Paradox?


1-84340
yaJohn
2003-06-16 12:08
2003.06.26
_быстрый_ TMemo с раскраской отдельных строк