Z
zouming
Unregistered / Unconfirmed
GUEST, unregistred user!
('Contents',ftFmtMemo,0,False)生成的带格式的备注字段的文件名为mb,
如何进行编程在创建数据时就生成rcm的扩展名:user.mb->user.rcm?该如何修改如下代码?
function CreateProjectTable(AliasName: String; DataBaseFileName: String): Boolean;
var
Table1: TTable;
begin
try
Table1:= TTable.Create(Application);
Table1.DatabaseName:= AliasName;
Table1.TableName:= DataBaseFileName; {以代号创建表文件名}
with Table1.FieldDefs do {创建字段}
begin
Add('ProjectNo',ftString,6,False);
Add('Project',ftString,40,False);
Add('Build_Unit',ftString,40,False);
Add('Project_Chief',ftString,8,False);
Add('Weave_Unit',ftString,40,False);
Add('Weave_Chief',ftString,8,False);
Add('Weave_Assessor',ftString,8,False);
Add('Organizer',ftString,8,False);
Add('Date',ftDate,0,False);
Add('Ground_Area',ftFloat,0,False);
Add('NonHowff_Area',ftFloat,0,False);
Add('Howff_Area',ftFloat,0,False);
Add('PubBldg_Area',ftFloat,0,False);
Add('TotalPrices',ftFloat,0,False);
Add('Price',ftFloat,0,False);
Add('Rubric',ftString,40,False);
Add('Contents',ftFmtMemo,0,False);
Add('Matters',ftFmtMemo,0,False);
end;
Table1.CreateTable; {在磁盘上创建表文件}
Table1.Free;
Result:= True;
except
Table1.Free;
Result:= False;
end;
end;
如何进行编程在创建数据时就生成rcm的扩展名:user.mb->user.rcm?该如何修改如下代码?
function CreateProjectTable(AliasName: String; DataBaseFileName: String): Boolean;
var
Table1: TTable;
begin
try
Table1:= TTable.Create(Application);
Table1.DatabaseName:= AliasName;
Table1.TableName:= DataBaseFileName; {以代号创建表文件名}
with Table1.FieldDefs do {创建字段}
begin
Add('ProjectNo',ftString,6,False);
Add('Project',ftString,40,False);
Add('Build_Unit',ftString,40,False);
Add('Project_Chief',ftString,8,False);
Add('Weave_Unit',ftString,40,False);
Add('Weave_Chief',ftString,8,False);
Add('Weave_Assessor',ftString,8,False);
Add('Organizer',ftString,8,False);
Add('Date',ftDate,0,False);
Add('Ground_Area',ftFloat,0,False);
Add('NonHowff_Area',ftFloat,0,False);
Add('Howff_Area',ftFloat,0,False);
Add('PubBldg_Area',ftFloat,0,False);
Add('TotalPrices',ftFloat,0,False);
Add('Price',ftFloat,0,False);
Add('Rubric',ftString,40,False);
Add('Contents',ftFmtMemo,0,False);
Add('Matters',ftFmtMemo,0,False);
end;
Table1.CreateTable; {在磁盘上创建表文件}
Table1.Free;
Result:= True;
except
Table1.Free;
Result:= False;
end;
end;