你完成可以进行动态的建表(根据参数)、而建完后修改就方便了
这时一个简单的取数据例子,只要写在你的DLL工程中就行了
function InsertStringID(DbName,TblName,IDFldName:String;StringIDLength:Word):String;
var
intID:Integer;
strID:String;
tblInsert:TTable;
begin
tblInsert:=TTable.Create(nil);
with tblInsert do
try
if Active then Close;
DatabaseName:=DbName;
TableName:=TblName;
Open;
intID:=RecordCount+1;
strID:=AddZeroToString(IntToStr(intID),StringIDLength);
while Locate(IDFldName,strID,[]) do
begin
Dec(intID);
strID:=AddZeroToString(IntToStr(intID),StringIDLength);
end;
Close;
finally
Free;
end;
Result:=strID;
end;