Table的ADD方法的一个问题

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
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

后退
顶部