我用这个程序把问题解决了,但遗憾的是,小数位还是自动的。如果有高手能解决,请
与我联系:
procedure tfrmfm.QuickCopyTable(T: TTable;DestTblName: string; Overwrite: Boolean);
var
DBType: DBINAME;
WasOpen: Boolean;
NumCopied: Word;
begin
//save table active state
WasOpen := T.Active;
if not WasOpen then T.Open; //ensure the table is open
//Get driver type string
Check(DbiGetProp(hDBIObj(T.Handle), drvDRIVERTYPE, @DBType, SizeOf(DBINAME), NumCopied));
//Copy the table
Check(DBICopyTable(T.DBHandle, Overwrite, PChar(T.Tablename),
DBType, PChar(DestTblName)));
//Restore active state
T.Active := WasOpen;
end;
接受答案,谢谢大家。