Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2004, 12:44 PM
Authorized User
 
Join Date: Mar 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compacting Access Database problem

Hi :

is it possible to compact a password protected Access 2000 database from code? I tied this:

DBEngine.CompactDatabase "c:\backend.mdb", "c:\backend1.mdb", ";pwd=password"

but I get an "Invalid password" error. Yet the password correctly open backend.mdb without a fuss in normal circumstances.

Any help would be greatly appreciated.

Thanks,

Ian


 
Old April 23rd, 2004, 11:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not getting any clue on that. But you can give a try on this.
Test opening the database programatically.

Set d = OpenDatabase("DBPass.mdb", True, False, ";pwd=newpassword")

See if this succeeds. Will try and find the reason.

-Vijay G





Similar Threads
Thread Thread Starter Forum Replies Last Post
compacting database pblm MathLearner VB Databases Basics 8 September 27th, 2007 07:34 AM
Compacting database Scootterp Access VBA 5 August 9th, 2006 09:33 AM
compacting access Tasha Access VBA 3 August 9th, 2004 07:46 PM
Compacting Access Database from code imaley Access 6 March 31st, 2004 05:33 PM
Compacting a large database takabyte Classic ASP Databases 1 February 5th, 2004 12:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.