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;
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;