Table的ADD方法的一个问题

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
Q: I use the help file example for the ADD method and I get an error message "comma expected". Why? A: The ADD method requires an undocumented fourth parameter. (OOPS!) It says whether the field is required. (true = required)
Here is the working code for that example:
 
var
t: tTable;
begin
t := tTable.create(self);
with t do
begin
Active := False;
DatabaseName := 'lwl';
TableName := 'hoser';
TableType := ttParadox;
with FieldDefs do
begin
Clear;
Add('Field1', ftInteger, 0, false);
Add('Field2', ftInteger, 0, false);
end;
with IndexDefs do
begin
Clear;
Add('Field1Index', 'Field1', [ixPrimary, ixUnique]);
end;
CreateTable;
end;
end;
 

Similar threads

I
回复
0
查看
873
import
I
I
回复
0
查看
496
import
I
I
回复
0
查看
446
import
I
I
回复
0
查看
585
import
I
顶部