Compress Access dbase from ASP

Results 1 to 7 of 7

Thread: Compress Access dbase from ASP

  1. #1
    Join Date
    Dec 1969
    Posts
    226

    Default Compress Access dbase from ASP

    I think it isn&#039;t possible, but you never know sure...<BR>is it possible to compress an Access database on a webserver from an .asp page? (assuming there aren&#039;t any users in it)<BR><BR>Hope someone knows the answer!<BR><BR>Greetz,<BR>Thomas Brinkman

  2. #2
    Join Date
    Dec 1969
    Posts
    2,958

    Default RE: Compress Access dbase from ASP

    You mean compact?

  3. #3
    Join Date
    Dec 1969
    Posts
    226

    Default RE: Compress Access dbase from ASP

    Sorry, yes I do :-)

  4. #4
    Join Date
    Dec 1969
    Posts
    2,958

    Default Here ya' go

    &#060;HTML&#062; <BR>&#060;HEAD&#062; <BR>&#060;TITLE&#062;Compact DB&#060;/TITLE&#062; <BR>&#060;/HEAD&#062; <BR>&#060;BODY bgcolor="#00FFFF"&#062; <BR>&#060;% <BR>MyInAccessDB = "/fpdb/SecureDB.mdb" <BR>MyOutAccessDB = "/fpdb/ComSecureDB.mdb" <BR>Set Engine = Server.CreateObject("JRO.JetEngine") <BR>MyFROMDSN = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" <BR>MyFROMDSN = MyFROMDSN & "DATA SOURCE=" & server.mappath(MyInAccessDB) & ";" <BR>MyTODSN = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" <BR>MyTODSN = MyTODSN & "DATA SOURCE=" & server.mappath(MyOutAccessDB) & ";" <BR>Engine.CompactDatabase MyFROMDSN, MyTODSN <BR><BR>%&#062; <BR>&#060;p align="center"&#062;&#060;b&#062;DELETE ACCESS DATABASE&#060;/b&#062;&#060;/p&#062; <BR>&#060;/BODY&#062; <BR>&#060;/HTML&#062;


  5. #5
    Join Date
    Dec 1969
    Posts
    226

    Default thanx.

    Thanx. Now i feel completly stupid because I couldn&#039;t find the option :-) <BR>Will implement it soon...

  6. #6
    Jim Rudnick Guest

    Default RE: Here ya' go

    Hello DougD...<BR><BR>I wonder if you could take a moment and just explain what&#039;s happening here? I have worked thru the code, and am somewhat lost as to what the ENGINE actually is, and what it can do?<BR><BR>Jim

  7. #7
    Join Date
    Dec 1969
    Posts
    10,852

    Default Engine itself, is simply a variable...

    What you are actually creating is an instance of ADOs Jet Replication Object, and then using the CompactDatabase method to create a new, compacted version of the old db.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •