Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases 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 May 21st, 2004, 03:38 AM
Authorized User
 
Join Date: May 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to myedu2k4
Default Compact And Repair Access Database

Hi guys...

I use VB code to compact and repair an Access Database, but i got a problem. I use
DBEngine.CompactDatabase strDbName, "Test2", , , ";pwd= " & strOldPwd ;but it show message that "invalid password" even i specify the correct password. Hope someone can help me to solve the problem.

Thanks in advance...

Pheap
 
Old May 25th, 2004, 01:43 AM
Authorized User
 
Join Date: May 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to myedu2k4
Default

I got the a solution now. If the Access Database has password we can not use this statment(DBEngine.CompactDatabase strDbName, "Test2", , , ";pwd= " & strOldPwd). so in order to use it we have to clear database password first and then we compact it and at last recover the old password. That's it.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Compact and Repair Access Database raguapk VB How-To 8 May 23rd, 2013 10:00 AM
Automatic Compact and Repair Corey Access VBA 4 March 29th, 2006 10:49 AM
is there any auto compact repair utility to buy ? surajguru Access 5 October 15th, 2005 02:45 PM
Compact/Repair Access Database On The Fly kevorkian Classic ASP Databases 3 November 22nd, 2004 06:57 PM
Compact Access Database lai_ccca Access VBA 0 January 9th, 2004 08:41 PM





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