Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 3rd, 2005, 5:12 AM   #1
melwinator
Newbie
 
Join Date: Mar 2005
Posts: 11
Rep Power: 0 melwinator is on a distinguished road
Question Compressing an Access database using ADO

hi All,
I am converting code written in DAO into ADO.
one problem i face is that i am not finding an equivalent function / code for compressing an MS Access database using ADO 2.8. This can be easily done using DAO. Someone told me its possible using ADOX but HOW????
I've been trying to find a solution for this for days now!!!!!
Can anyone help me!!???
melwinator is offline   Reply With Quote
Old May 3rd, 2005, 1:56 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
What do you mean by compressing: compacting/repair or physically zipping up the file?
Thanks.
Rory is offline   Reply With Quote
Old May 3rd, 2005, 11:43 PM   #3
melwinator
Newbie
 
Join Date: Mar 2005
Posts: 11
Rep Power: 0 melwinator is on a distinguished road
Yeah I mean compacting/repair. I want to do this cause i am making a utility to synchronize data in two Access databases. So once that is done, I want to compact the database.....
melwinator is offline   Reply With Quote
Old May 4th, 2005, 11:38 AM   #4
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
I'm assuming you're using Jet in which case the way it actually works is reprocessing the whole database into a new one:
Set DBM = New JRO.JetEngine
With DBM
.CompactDatabase ConnectionString1, ConnectionString2
End With
Set DBM = Nothing
Where ConnectionString1 and ConnectionString2 are normal formatted ADO connection strings, including username/password for both.
Note that you'll need exclusive access, including to the security tables.
Hope this helps.
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:48 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC