oVFP = CREATEOBJECT('VisualFoxpro.Application.6') oVFP.DoCmd('OPEN DATABASE insert-full-path-to-DBC EXCLUSIVE') oVFP.DoCmd('PACK DATABASE') RELEASE oVFPThat only works if the VFP6 IDE is installed on the machine, which isn't possible on a production server.