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

compact a Microsoft Access database through odbc

Hi,

My csharp application access a MS Access database through odbc connection.
Is there a way to compact the Access database after deleting records using
the odbc connection?

I found out how to do this with Microsoft Jet and Replication Objects
Library [1], but unfortunately it seems that there is no way with ODBC.

Any glue how this can be achieved are very welcome.

Michael

[1] How to compact a Microsoft Access database by using Visual Basic .NET

http://support.microsoft.com/default...;en-us;Q306287
Nov 17 '05 #1
1 3161
> My csharp application access a MS Access database through odbc connection.
Is there a way to compact the Access database after deleting records using
the odbc connection? [snip] Any glue how this can be achieved are very welcome.


I have done a lot of research about this topic. Unfortunately I found no
solution. I found many issues on this topic. Some people use
SQLConfigDataSource [1] to compact the database via odbc. But in my case I
have to use an already existing system DSN. The path to the database is
unknown. Therefore I can't use this approach nor the JetEngine.

Any hint/suggestion/... is highly appreciated.

BTW: Just have the idea to read out the database path from the ODBC source.
Is this possible? Then I can use this as a workaround, read out the path and
then use theJetEngine.

Thanks in advance,

Michael
[1] SQLConfigDataSource(NULL,ODBC_ADD_DSN,(LPSTR)"Micr osoft Access Driver
(*.mdb)",
"COMPACT_DB=C:\\source.mdb C:\\dest.mdb General\0\0");
Nov 17 '05 #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...
3
by: Paolo | last post by:
Hi, I am trying to compact and repair my database, however every time I try it comes up a message saying: Table: "TempMSysAccessObject already exists", whenever I try to look for this table I...
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...
3
by: yves piel | last post by:
Hello, I'm developping a java application which use an ms-access database via jdbc/odbc bridge. However, it seems that ms-access databases have to regularly been compacted (for indexes and page...
1
by: somersbar | last post by:
hey, ive been trying to set up a web form in visual basic.net that can access a microsoft access database. i need to use odbc also. i can get it working using a windows form but not a web form....
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
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...
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...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.