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

Вниз

Создание базы данных   Найти похожие ветки 

 
Rammst   (2002-11-20 08:03) [0]

Как в run-time создать базу данных и сохранить ее.


 
Дмитрий К.К. ©   (2002-11-20 09:21) [1]

Table Creation Example

The following example shows how to create a table.

{ Don"t overwrite an existing table }

if not Table1.Exists then begin
with Table1 do begin
{ The Table component must not be active }
Active := False;
{ First, describe the type of table and give }
{ it a name }
DatabaseName := "DBDEMOS";
TableType := ttParadox;
TableName := "CustInfo";
{ 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;


Добросовестно скопировал из справки Delphi :)


 
Anatoly Podgoretsky ©   (2002-11-20 09:36) [2]

CreateDir



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

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

Наверх




Память: 0.47 MB
Время: 0.019 c
4-28328
serd_hhc
2002-10-26 06:38
2002.12.09
Как узнать под какой учётной записью запущено окно?


4-28360
SlashSW
2002-10-28 21:59
2002.12.09
Анимированная иконка в tray


14-28206
Праведник
2002-11-15 22:34
2002.12.09
Звук в Делфи


1-27940
Dave[G]
2002-11-29 11:12
2002.12.09
Вопрос...


4-28362
SVM
2002-10-26 00:45
2002.12.09
Снова Ресурсы