2010年12月21日 星期二

C# 壓縮資料庫

壓縮資料庫
設定引用項目 Microsoft Jet and Replication Objects X.X library
using JRO;

JetEngine x = new JetEngine();
x.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\original1.mdb;",

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\aa.mdb"); 

Points of Interest

Interesting, that Jet Engine 5 is used for JET4X databases. Be careful. See the table:
Jet OLEDB:Engine Type Jet x.x Format MDB Files
1 JET10
2 JET11
3 JET2X
4 JET3X
5 JET4X

沒有留言:

張貼留言