L
ligbin
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure CreateNewDbf(FileName, DirList: string);
var NewDbf: TTable;
begin
NewDbf := TTable.Create(self);{报没有定义SELF}
with newdbf do
begin
DatabaseName:=DirList;
TableName:=trim(filename);
TableType:=ttFoxpro;
with FieldDefs do
begin
Clear;
Add('Name',ftString,40,false);
Add('Address',ftString,80,false);
Add('Post',ftString,6,false);
end; //------end Fields
CreateTable;
end; //------end newdbf
end;
编译时在开关部分报错,请指教。
var NewDbf: TTable;
begin
NewDbf := TTable.Create(self);{报没有定义SELF}
with newdbf do
begin
DatabaseName:=DirList;
TableName:=trim(filename);
TableType:=ttFoxpro;
with FieldDefs do
begin
Clear;
Add('Name',ftString,40,false);
Add('Address',ftString,80,false);
Add('Post',ftString,6,false);
end; //------end Fields
CreateTable;
end; //------end newdbf
end;
编译时在开关部分报错,请指教。