469,644 Members | 1,909 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

Access database password removed after compacting - why???

Hi all

The below code is compacting a database that has a password. Unfortunately
once the below code is complete the database does not have a password anymore.
How do I have it so the password remains or re-create the password on the
compacted database?? For example say the password on this database is :
'abcdef'. Thanks in advance.

public void compactAccessDB(string targetPath, string strTargetPath )
string destConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data source = " +

if( System.IO.File.Exists("FileTmp.mdb") )

JRO.JetEngineClass objJet = new JRO.JetEngineClass();
objJet.CompactDatabase(strTargetPath, destConnection);

System.IO.File.Move("FileTmp.mdb", targetPath);
} //End of compactAccessDB.

Message posted via DotNetMonster.com
Nov 25 '05 #1
0 999

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by latosca68 | last post: by
6 posts views Thread by owengoodhew | last post: by
5 posts views Thread by Nathan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.