473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Compacting an Access database with VB.NET

I want to install a VB.NET application that uses an Access database on a
computer that does not have Microsoft Access installed. I want to compact
the database on occasion. If Access was installed I could use something like:

Dim AccessApp As New Access.Application
AccessApp.Application.CompactRepair("C:\Mydatabase .mdb", "C:\Temp.mdb")

Without Access on the computer, this code does not work. Is there an
alternate way to compact the database?

Nov 21 '05 #1
2 1363
"genojoe" <ge*****@discussions.microsoft.com> schrieb:
I want to install a VB.NET application that uses an Access database on a
computer that does not have Microsoft Access installed. I want to compact
the database on occasion. If Access was installed I could use something
like:

Dim AccessApp As New Access.Application
AccessApp.Application.CompactRepair("C:\Mydatabase .mdb", "C:\Temp.mdb")

Without Access on the computer, this code does not work. Is there an
alternate way to compact the database?


HOW TO: Compact a Microsoft Access Database by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;306287>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
I answered the same question yesterday in this newsgroup with the same MS
article

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Peter Verhelst | last post by:
Hello, Currently I am running an Access database on a windows WTS server, running Microsoft Windows 2000 server 5.00.2195 Service Pack 3. This database should be accessible for everybody in our...
1
by: Annette Massie | last post by:
I have an Access 2000 database we originally had on a server in our network and used asp to connect to it, browse and display records. I have queries that run at 3:00 am in the morning to delete...
5
by: lappy | last post by:
Hello, I have written a small programme to compact an access 97 database. Dim je As New JRO.JetEngine ' Compacts database Data.Mdb to Data2.mdb. je.CompactDatabase...
2
by: Simon Johnson | last post by:
Hi all, I'm writing a program that does a lot of table droping and updating.. After i've performed these steps it would be nice to run the compact and repair function on the database. How can I...
1
by: Lyle Fairfield | last post by:
Today I asked Access 2007 to compact db1.mdb. Access 2007 showed a message to me that I did not read carefully; my recollection is that it said it could not save the compacted copy as db1.mdb,...
7
by: DavidB | last post by:
I have a standard FE/BE database. I'd like to be able to have a button on each db that allows the admin to compact the database. I am using the following code to perform the compact. Private...
1
by: Slez via AccessMonster.com | last post by:
I do a routine compact and repair on a back end MS Access 2002 database. This time I had something peculiar occur. The compact started as normal, than the following error message popped up (I...
3
by: DSSMaster | last post by:
I am trying to use windows scheduler to compact a database. In the task run line I have the following: "C:\Program Files\Microsoft Office\OFFICE11 MSACCESS.EXE" _ "C:\Files\Access\Sacroc.mdb"...
2
by: HH | last post by:
It seems like the built-in compact function does not compact at all. A mdb file made under 2003 has been grown to over 100Mb. Compacting in access 2003 results in a file smaller then 5Mb....
32
by: Andy | last post by:
To further follow up on my last post regarding the docmd.quit vs. Application.quit using access 2007, I noticed that docmd.quit will correctly compact the database (program file) if you have the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.