473,320 Members | 1,945 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,320 software developers and data experts.

compact database Access 2007 via VB.net

Hi,

Has anyone succeed to compact an Access 2007 database via VB.net code?

The previous methods from JRO don't work anymore and there is no help
on msdn on how this could be done for 2007.

We use the correct connection string for 2007 with Microsoft ACE 12.
sConn= "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
sSource & ";User IDPassword=test;"
Many thanks,
Adrian

Jan 30 '07 #1
1 8471
On 30 Jan 2007 01:47:09 -0800, ad****@pintilie.ro wrote:

One option is to execute a command line:
<path to>\msaccess.exe <path to>\my.mdb /compact
Typically this is done from a Scheduled Task, but you can also do it
from any other programming environment.

Another option is to use COM interop and use the DAO method
CompactDatabase.

-Tom.
>Hi,

Has anyone succeed to compact an Access 2007 database via VB.net code?

The previous methods from JRO don't work anymore and there is no help
on msdn on how this could be done for 2007.

We use the correct connection string for 2007 with Microsoft ACE 12.
sConn= "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
sSource & ";User IDPassword=test;"
Many thanks,
Adrian
Jan 31 '07 #2

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

Similar topics

13
by: Larry L | last post by:
Access is noted for bloating a database when you add and delete records frequently. I have always had mine set to compact on close, and that works great. Now after everyone's advice I split my...
6
by: MLH | last post by:
I just used Tools / Database Utilities / Compact Database in Access 97 for the first time. Unlike Access 2.0, it does not ask me to furnish a filename for it to compact into. It just launched...
2
by: gibsonsgman | last post by:
hello, i have a question about compactin/repairing a database at runtime. i have code that will do this, but when it runs i get the error "You can't compact the open database while running a...
0
by: Adrian | last post by:
Hi, Has anyone succeed to compact an Access 2007 database via VB.net code? The previous methods from JRO don't work anymore and there is no help on msdn on how this could be done for 2007. ...
2
by: Ron | last post by:
Hi All, Using WinXP pro/Access 2000. I have a database that's been used for about 5 months. Transferred lots of data from a dos based program, then the users have been using it for that 5...
9
by: Ron | last post by:
New discovery. If I take a perfectly good database, and "compact/repair" on it with Access 2000 (seems to be at multiple sites--I've tried it with my system here, at another office on an...
5
by: ISUTri | last post by:
We are currently converting from Access 2003 to Access 2007. I have an Access app that is going to be very difficult to convert. This App is used by people that are out in the field and are a...
3
by: troy_s11 | last post by:
I have deleted a lot of imformation from a database that has gotten large. After deleting the data, I did a compact and repair thinking it would reduce the size of the database. It doesn't change...
2
by: Icarus | last post by:
I've got several Access 2000 databases that are currently being run with Access 2007. When the databases close, I've got them set to compact on close. This creates the database1.mdb file,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.