|
-
Feb 11th, 2003, 05:10 AM
#1
Thread Starter
Addicted Member
Are recordes really deleted?
Hi guys
Well I have a mdb Database with size of 5 mb’s there was a table in it which had taken a lot of space but when I delete it through code or through visdata or access by such SQL statement:
Delete * From Table1
All fields of the table seems to be deleted but when I check the size of the mdb file, it is exactly the same size of the file before the fields of that large table was deleted. Does anyone know what the reason is? Do the data just become invisible? But it is somewhere in the file for future restoring? And how can I remove the data completely from the database?
Thank u
-
Feb 11th, 2003, 05:36 AM
#2
PowerPoster
you need to compact the db. You can do that manually, or through code. Look up "compact" in Access's on-line help.
-
Feb 11th, 2003, 09:44 AM
#3
Thread Starter
Addicted Member
Originally posted by phinds
you need to compact the db. You can do that manually, or through code. Look up "compact" in Access's on-line help.
I’m using DBngine.CampactDatabase method to compact the db but one problem:
It compacts the database in a second db but I want to compact the db just where it is. Because the database must be always opened.
Is there some other way to compact the db (of course compact it in itself)?
-
Feb 11th, 2003, 09:58 AM
#4
no because the database must be closed to be compacted. Its a matter of file sharing violation like anything else.
Besides there is no reason to need the database to be open while being compacted.
-
Feb 11th, 2003, 10:06 AM
#5
Thread Starter
Addicted Member
Originally posted by Cander
no because the database must be closed to be compacted. Its a matter of file sharing violation like anything else.
Besides there is no reason to need the database to be open while being compacted.
I can't close the db coz some other app is using it too. and that application opens the db as exclusive and this app must always be running. so once i want to run my own app i must close the second app.
open the db in my own app
then open the second app
and i can do this only once coz the app must always be running
that's why i wanted to compact the db without closing it
-
Feb 11th, 2003, 10:12 AM
#6
AFAIK it can't be done. The DB MUST BE CLOSED to prevent corruption during the compacting. If it's a problem, wait until after hours when no one is using the DB.
-
Feb 11th, 2003, 12:17 PM
#7
mrdj1002,
As all others that told you it can not be done. You need to believe it.
One must learn that one can not change the laws of physics just because they are inconvienent!!
-
Feb 11th, 2003, 12:21 PM
#8
Originally posted by randem
One must learn that one can not change the laws of physics just because they are inconvienent!!
No, but you should be able to subclass it, then use a Callback Method to redefine its behavior.
-
Feb 11th, 2003, 03:53 PM
#9
Thread Starter
Addicted Member
-
Feb 11th, 2003, 03:57 PM
#10
Frenzied Member
Access database over a network?
-
Feb 11th, 2003, 04:09 PM
#11
Thread Starter
Addicted Member
Originally posted by Shawn N
Access database over a network?
no it's not a network.... the case is that 2 apps are sharing one db. my app is the second app which enhances the first app capibilitis
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|