Code toValidate MS Project File RRS feed

  • Question

  • Hi,
    I urgently require any tool or code to
    validate a MS project file created in .mpd format.
    I have searched in SDK if any API is available to validate mpd files   but it is not available.

    Monday, June 6, 2011 1:13 PM


All replies

  • The only way to validate it is to open in in Project. Note Project 2007 and later can't save to .mpd format Use automation to test this if you have a lot of projects in a .mpd or lots of .mpd files.

    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management
    Tuesday, June 7, 2011 8:40 AM
  • Hi Rod Gill,

    Thanks for your valuable suggestions. We have tried to open the .mpd file in MS Project 2003 and then we closed it, it works fine but just after this we have call to CompactDatabase() for this file only and then it hangs in this function. 

    callstack is,

    msjet40.dll!Collection::RemoveObject()  + 0x30 bytes msjet40.dll!Transaction::RemovePageDesc()  + 0x1e bytes msjet40.dll!PageDesc::Transfer()  + 0x3c bytes msjet40.dll!Transaction::Transfer()  + 0x35 bytes msjet40.dll!LvDataNew::MergeNewPages()  + 0x359d2 bytes msjet40.dll!Cursor::LvMergeNewPages()  + 0x4a bytes msjet40.dll!Cursor::Update()  + 0x114c6 bytes msjet40.dll!_ErrIsamCopyRecords@32()  + 0x3b6 bytes msjet40.dll!_ErrDispCopyRecords@32()  + 0x5e bytes msjet40.dll!_ErrCopyTable@16()  + 0x23e bytes msjet40.dll!_ErrCopyObject@16()  + 0x1bd bytes msjet40.dll!_ErrCopyObjects@4()  + 0x12d bytes msjet40.dll!_JetCompact@28()  + 0x2ec bytes dao360.dll!_ErrIntJetCompactDatabase@24()  + 0x1e7 bytes dao360.dll!_DBEngineW::CompactDatabase()  + 0x1e2 bytes oleaut32.dll!_DispCallFunc@32()  + 0xa6 bytes oleaut32.dll!CTypeInfo2::Invoke()  + 0x1b4 bytes oleaut32.dll!_DispInvoke@32()  + 0x23 bytes dao360.dll!CDAOStdInterface::Invoke()  + 0xbc bytes mfc42.dll!COleDispatchDriver::InvokeHelperV()  + 0x1f9 bytes mfc42.dll!COleDispatchDriver::InvokeHelper()  + 0x25 bytes  

    DataBaseEngine::CompactDatabase(const char * SrcName, const char * DstName, const tagVARIANT & DstLocale, const tagVARIANT & Options, const tagVARIANT & SrcLocale)  Line 119 + 0x2d bytes


    I have checked the limitations of CompactDatabase(), it says that file should not be in open state and enough disk space is available, we satisfy both conditions.

    So i am doubting CompactDatabase() gets hang because .mpd may not be valid..

    Any views on this???


    Tuesday, June 7, 2011 9:12 AM