Access数据库体积太太,如何减小 小弟在用Access数据库来开发一个单机版的管理系统时,在Win98下运行,数据刚输入不到10万条数据库的占用空间就达到1.2G,但在Win2000下输入就没有这个问题,请问各位高手高高手有什么办法解决这个问题?(最好不要用MS Access的压缩和恢复数据库来压缩数据库,这样太麻烦) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 uses comobj;procedure Tfrom.N1Click(Sender: TObject);var X: OleVariant; source,temp:string;begin source:=extractfilepath(application.exename)+'a.mdb'; temp:=extractfilepath(application.exename)+'temp.mdb'; adoconnection.Connected:=false; try X:= createoleobject('JRO.JetEngine'); x.CompactDatabase('Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+sourcefile+'','Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+tempfile+''); if fileExists(source) and FileExists(temp) then if deleteFile(source)then RenameFile(temp,source); except x.Release; end; adoconnection.Connected:=true;end; uses comobj;procedure Tfrom.N1Click(Sender: TObject);var X: OleVariant; source,temp:string;begin source:=extractfilepath(application.exename)+'a.mdb'; temp:=extractfilepath(application.exename)+'temp.mdb'; adoconnection.Connected:=false; try X:= createoleobject('JRO.JetEngine'); x.CompactDatabase('Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+sourcefile+'','Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+tempfile+''); if fileExists(source) and FileExists(temp) then if deleteFile(source)then RenameFile(temp,source); except x.Release; end; adoconnection.Connected:=true;end; 没人用sysbase的anywhere做单机吗? 动态数组为类的时候的元素删除 关于如何调用及取回存储过程的输出参数。。 初来乍到,各位朋友帮帮我! 请问,使用quickrep组件生成报表,纸张大小怎么设置? 关于网络蚂蚁悬浮窗的问题,为什么我的悬浮窗会被最小化? 三层结构如何同时建立不同的连接 wks(mex)过来拿分 李维公布新书Delphi.NET Developer Guide写作计划,诚邀高手出谋划策 小问题,今日必结贴:如何在局域网内共享MODEM上网? 怎样修改登录名? fastreport奇怪的问题,在文本编辑器中输入的汉字显示乱码,如何解决? 请问什么入门的好书吗?多谢了!!!
var
X: OleVariant;
source,temp:string;
begin
source:=extractfilepath(application.exename)+'a.mdb';
temp:=extractfilepath(application.exename)+'temp.mdb';
adoconnection.Connected:=false;
try
X:= createoleobject('JRO.JetEngine');
x.CompactDatabase('Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+sourcefile+'','Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+tempfile+'');
if fileExists(source) and FileExists(temp) then
if deleteFile(source)then
RenameFile(temp,source);
except
x.Release;
end;
adoconnection.Connected:=true;
end;
var
X: OleVariant;
source,temp:string;
begin
source:=extractfilepath(application.exename)+'a.mdb';
temp:=extractfilepath(application.exename)+'temp.mdb';
adoconnection.Connected:=false;
try
X:= createoleobject('JRO.JetEngine');
x.CompactDatabase('Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+sourcefile+'','Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+tempfile+'');
if fileExists(source) and FileExists(temp) then
if deleteFile(source)then
RenameFile(temp,source);
except
x.Release;
end;
adoconnection.Connected:=true;
end;