Print Page | Close Window

Compact and Repair Protected Access Database

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=26411
Printed Date: 03 April 2026 at 4:49am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Compact and Repair Protected Access Database
Posted By: wendy_2006
Subject: Compact and Repair Protected Access Database
Date Posted: 16 October 2008 at 5:55pm
Hi all,
I set a password for my access database, and changed database_connection.asp like this:
strDbPathAndName="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\domain\...\database.mdb; Jet OLEDB:Database Password=123456789;"

Everything work fine.

But when I tried to compact  & repair database, I got the message:
Microsoft VBScript runtime error '800a0034'
Bad file name or number
/forum/admin_compact_access_db.asp, line 107

Line 107 in admin_compact_access_db.asp is:  objFSO.CopyFile strDbPathAndName, Replace(strDbPathAndName, ".mdb", "-backup.mdb", 1, -1, 1)


Does anyone have any idea ? Any help would be appreciated.



Replies:
Posted By: WebWiz-Bruce
Date Posted: 16 October 2008 at 6:12pm
Personally I would not bother password protecting the Access database as it is a complete waste of time and courses a number of issues.

It takes less then a few seconds to get into a password protected Access database using tools on the Internet that are widely available. We use them all the time when clients forget their passwords to their databases.

The best way to protect your Access database is place the database in a non public directory as described in the documentation below:-

http://www.webwiz.net/webwizforums/kb/moving_access_database.asp - http://www.webwiz.net/webwizforums/kb/moving_access_database.asp


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: wendy_2006
Date Posted: 16 October 2008 at 6:30pm
Thanks Bruce for quick reply. I moved my Access Database to a folder above the root directory, but I want an extra protection for my database (for some reasons). Anyway, thanks for this helpful advice. I am still looking for a solution.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net