-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTableCreate
More file actions
32 lines (32 loc) · 998 Bytes
/
TableCreate
File metadata and controls
32 lines (32 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
begin
with MyTable do
begin
DatabaseName:='d:\temp';
TableName:='customer';
with FieldDefs do
begin
Clear;
Add('CustNo',ftFloat,0,True);
Add('Company',ftString,30,False);
Add('Addr1',ftString,30,False);
Add('Addr2',ftString,30,False);
Add('City',ftString,15,False);
Add('State',ftString,20,False);
Add('Zip',ftString,10,False);
Add('Country',ftString,20,False);
Add('Phone',ftString,15,False);
Add('FAX',ftString,15,False);
Add('Contact',ftString,20,False);
end;
with IndexDefs do
begin
Clear;
Add('','CustNo',[ixPrimary]);
Add('ByCompany','Company',[ixCaseInsensitive],
'',icDuplicateByte);
end;
if not Exists then
CreateTable;
end;
end;
//https://www.elevatesoft.com/manual?action=viewtopic&id=dbisam4&product=delphi&version=5&topic=creating_altering_tables