Compacting database

R

Roy Goldhammer

Hello there

I neet do reset auto number on access databases outside of access (on vb
full)

For this i know that i need to compact the database ahd it done when the
table is empty

Is there a way do compact access database with vb code (not access VB )?

any help would be useful
 
D

Douglas J. Steele

Assuming you're got a reference to DAO in your program, you can use the
DBEngine object's CompactDatabase method.

If for some reason you don't want to use DAO, you can use JRO.
http://support.microsoft.com/?id=230501

However, in my opinion, the desire to reset the value of an autonumber field
is usually indicative of a misuse of autonumbers. Autonumbers exist for a
single purpose: to provide a (practically guaranteed) unique value that can
be used for a primary key. Whether those values are 34564,34565, 34566 or 1,
2, 3, that purpose is met. Seldom, if ever, should your users even be aware
of the value of an autonumber field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top