Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way in VBCE to pack or optimize an M$ access CDB database?

Status
Not open for further replies.

rhyd

Programmer
Apr 4, 2002
5
0
0
GB
i have written a vbce program for use in retail POS type environment. The system uses an access database to record sales, then when it syncs this database with the desktop a routine on the desktop copies the sales data into a master table and zaps the original (on the desktop), so that on next sync the sales that have previously been successfully transfered are deleted from the ipaq... However, although the database on the ipaq now contains no records the size of the file doesn't change. When more sales are added the file size doesn't grow (deleted record slots are being reused). This isn't ideal because the database will always be the same size as the largest it has ever been (unless I remove the syncronisation, and then add the table back to the handheld).

Is there a way in VBCE to pack or optimize a CDB database?
 
I would think that it would be safer so that the memory needed by the sales information will always be available. I would actually hesitate to shrink the size and add more programs because obviously that size has been needed at some point, so it would probably be better to leave it and have that buffer there. NO one likes using up space on handhelds, but better that it be there then to have to throw out inserts down the road if there isn't enough room.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
thanks for your help. I agree this probably will end up being beneficial most of the time. But it does seem MS have left out a feature available in vitually every other DB ever created! The only way to actually compact a database is to remove it from the handheld entirely and copy it back from he PC using activesync - crazy!!!

thanks again
 
rhyd, I have just recently worked on the same prob when creating an access backend for the handheld, instead of using activesync to copy the file I have made a work around as I found that activesync does not always update the file everytime you place it in the handheld. The solution was to develop a Vb program that runs evertime activesync runs.
How it works
Upload file to Desktop
update desktop access database
delete uploaded file
copy clean database to handheld.

I can supply you with a bit of code if you need.

[afro]Zeroanarchy Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.
 
I ran into your same error 2 years ago when I first started developing EVB programs with CDB's. The answer from Microsoft was no. It is available in the SSCE DB, but not the CDB. I had no choice at the time, so I did solve the problem. It requires more work on your part though. You will have to literally create another CDB from scratch with its own tables and what not. Then you you will have to copy the records into the new CDB. Be sure and place error checking in all the way and make a back up of your current CDB in order to restore it back in case something goes wrong. Hope this helps you. I know I didn't like this solution back then, but it has been a savior.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top