Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Compact DB

Discussion in 'Information Technology' started by Tom, Jul 28, 2006.

Tags:
  1. Tom

    Tom
    Expand Collapse
    Guest

    Hi all,

    I have a button that run a vb query statement to delete records.
    I would like to compact the DB after deletion.

    1. is it recommended?
    2. what code line I should add?

    Thanks,
    Tom
     
  2. Tom

    Tom
    Expand Collapse
    Guest

    I found: Me.Application.CompactRepair
    It`s sound right, but will it do the job?

    Thanks,
    Tom
    "Tom" <partner1973@yahoo.com> wrote in message
    news:u6VSEUVfGHA.1324@TK2MSFTNGP04.phx.gbl...
    > Hi all,
    >
    > I have a button that run a vb query statement to delete records.
    > I would like to compact the DB after deletion.
    >
    > 1. is it recommended?
    > 2. what code line I should add?
    >
    > Thanks,
    > Tom
    >
     
  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    You cannot use the CompactRepair method to compact a database if it's
    currently open. However, if you've followed proper design, so that your
    application is split into a front end (containing the queries, forms,
    reports, macros and modules), linked to a back end (containing the tables
    and relationships), the front end can compact the back end (provided, of
    course, that the back end isn't current in use: you can tell by whether or
    not the ldb locking file exists for the back end)

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Tom" <partner1973@yahoo.com> wrote in message
    news:%233%23G%23QWfGHA.1204@TK2MSFTNGP02.phx.gbl...
    >I found: Me.Application.CompactRepair
    > It`s sound right, but will it do the job?
    >
    > Thanks,
    > Tom
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:u6VSEUVfGHA.1324@TK2MSFTNGP04.phx.gbl...
    >> Hi all,
    >>
    >> I have a button that run a vb query statement to delete records.
    >> I would like to compact the DB after deletion.
    >>
    >> 1. is it recommended?
    >> 2. what code line I should add?
    >>
    >> Thanks,
    >> Tom
    >>

    >
    >
     
  4. Tom

    Tom
    Expand Collapse
    Guest

    Thanks.

    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:%2395cM8YfGHA.4464@TK2MSFTNGP04.phx.gbl...
    > You cannot use the CompactRepair method to compact a database if it's
    > currently open. However, if you've followed proper design, so that your
    > application is split into a front end (containing the queries, forms,
    > reports, macros and modules), linked to a back end (containing the tables
    > and relationships), the front end can compact the back end (provided, of
    > course, that the back end isn't current in use: you can tell by whether or
    > not the ldb locking file exists for the back end)
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:%233%23G%23QWfGHA.1204@TK2MSFTNGP02.phx.gbl...
    >>I found: Me.Application.CompactRepair
    >> It`s sound right, but will it do the job?
    >>
    >> Thanks,
    >> Tom
    >> "Tom" <partner1973@yahoo.com> wrote in message
    >> news:u6VSEUVfGHA.1324@TK2MSFTNGP04.phx.gbl...
    >>> Hi all,
    >>>
    >>> I have a button that run a vb query statement to delete records.
    >>> I would like to compact the DB after deletion.
    >>>
    >>> 1. is it recommended?
    >>> 2. what code line I should add?
    >>>
    >>> Thanks,
    >>> Tom
    >>>

    >>
    >>

    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page