!!!
解决方案 »
- 请各位帮忙修改一个备份数据库的代码,谢谢
- 請問一個很簡單的問題:dbf文件是什麽數據庫的數據文件,怎麽把數據導出來
- 取得控件的名称!?
- 用ReportBuilder制作多个报表如何实现统一的页眉与页脚?
- DELPHI中怎样取的文件的属性?
- 这句VC的程序如何翻译过来
- VCL的一个Bug?
- delphi7如何把excel里的数据导入到ACCESS数据库中?
- 关于修改XP用户登录密码的问题???
- 请问那里有带checkbox的treeview控件下载?
- 急救!!!delphi中编写多线程程序出现list out of bounds(????),怎么解决
- not enough timers available 是为什么?
function. The TTable passed as the first parameter must
be closed. The TDatabase passed as the second parameter
must be connected. }
var
TblDesc: CRTblDesc;
begin
Result := DBIERR_NA;
FillChar(TblDesc, SizeOf(CRTblDesc), 0);
StrPCopy(TblDesc.szTblName, Tbl.TableName);
TblDesc.bPack := True;
Result := DbiDoRestructure(Db.Handle, 1, @TblDesc, nil, nil, nil, False);
end; function dgPackDbaseTable(Tbl: TTable): DBIResult; { Pack a dBASE table by calling DbiPackTable. The table
passed as a parameter will be opened if it isn't open. }
begin
Result := DBIERR_NA;
if Tbl.Active = False then
Tbl.Open;
Result := DbiPackTable(Tbl.DBHandle, Tbl.Handle,
nil, nil, True);
end;
****************************
要压缩dBase数据库很简单,只要下面的操作即可:
DBIPackTable(Table1.DbHandle, Table1.Handle, 'TABLENAME.DBF', szDBASE, TRUE);
当然,Table必须用exclusive方式打开!
如.db.pas 什么的