Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2002.12.09;
Скачать: [xml.tar.bz2];

Вниз

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

 
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;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.01 c
3-27846
BSD
2002-11-09 16:59
2002.12.09
Утечки памяти в TIBQuery :(


1-28027
aspen
2002-11-29 13:25
2002.12.09
Как сделать в одном проекте?


1-28119
mila
2002-11-28 16:03
2002.12.09
как написать проверку


1-27922
Diamond Cat
2002-11-28 00:32
2002.12.09
отправка факсов


7-28318
netm
2002-10-09 22:34
2002.12.09
Как добавить путь к своей программе в Win2k?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский