|
 |
VB How-To Ask your "How do I do this with VB?" questions in this forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

November 6th, 2007, 04:56 PM
|
Registered User
|
|
Join Date: Nov 2007
Location: ffps fspf, jjfgkfg, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Compact and Repair Access Database
Hai !
How can i compact an repair a password protected Access data base file using vb 6.0. i use access 2000 version
Thanks in advance
|

November 6th, 2007, 05:41 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
Hi there.. I don't remember the exact code, but ADOengine has a compact (that also repair) function...
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
|

November 6th, 2007, 09:07 PM
|
Friend of Wrox
|
|
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
|
|
|

May 21st, 2013, 05:41 PM
|
Registered User
|
|
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Access 2007 compact and repair thru VBA
Hello,
Does anyone know how to compact a db in Access 2007 using VBA code? I will be happy to compact it on closing the application, since the database would have to be closed during the compact process.
Thank you all in advance!
|

May 22nd, 2013, 03:46 AM
|
Friend of Wrox
|
|
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can try this one
Sub Main()
Dim jro As JRO.JetEngine
jro = New JRO.JetEngine()
jro.CompactDatabase("Provider=Microsoft.Jet.OLEDB. 4.0;Data Source=C:\nwind.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NewNwind.mdb;Jet OLEDB:Engine Type=5")
MsgBox("Finished Compacting Database!")
End Sub
__________________
(*_*)
Numan
--------------------------------------------------
It is not important what you get But important is how you got it
|

May 22nd, 2013, 03:47 AM
|
Friend of Wrox
|
|
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
|
|
Hi
Do you want it to be done using Access Vba or from Excel or Word
Cheers
Shasur
|

May 22nd, 2013, 10:33 AM
|
Registered User
|
|
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Compact db in Access 2007
Shaur,
I am trying to do it from Access 2007 via VBA.
Thank you,
Bella
|

May 22nd, 2013, 10:35 AM
|
Registered User
|
|
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Numan,
Thank you for your reply, nope, the code does not want to work..:(
Bella
|

May 23rd, 2013, 10:00 AM
|
Friend of Wrox
|
|
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by bzboex
Hi Numan,
Thank you for your reply, nope, the code does not want to work..:(
Bella
|
In case of VBA
http://stackoverflow.com/questions/1...atabase-in-vba
might be helpful for you.
Best of luck :)
__________________
(*_*)
Numan
--------------------------------------------------
It is not important what you get But important is how you got it
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |