Help Compacting a database

Results 1 to 2 of 2

Thread: Help Compacting a database

  1. #1
    Join Date
    Dec 1969

    Default Help Compacting a database

    Hello can you help? I found this code that works when compacting my database on my local drive but I can&#039;t get it to work trying to use the Server.Mappath method. Can anyone show me how this is done?<BR><BR>Thanks<BR><BR>&#060;%<BR>Set Engine = CreateObject("JRO.JetEngine")<BR>Engine.CompactDat abase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:inetpubwwwrootfreddydb2000.mdb", _<BR>"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:inetpubwwwrootfreddydb2003.mdb"<BR>%&#062 ;

  2. #2
    Join Date
    Dec 1969

    Default RE: Help Compacting a database

    Hi<BR><BR>Server.MapPath translates a virtual path to a file -a database in this case- to a physical directory like the one you write &#039;by hand&#039;. <BR><BR>So, after looking to your code, you should use<BR><BR>Server.MapPath("freddydb2003.mdb")<BR>< BR>Hope it helps.

Posting Permissions

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