locked
Visual Studio fatal error C1033: cannot open program database

    Question

  • Whenever i try to compile a program in VS it gives me this error in the output field.

    fatal error C1033: cannot open program database


    Are there any solutions to the problem? If so i have not found any. Any help is appreciated!

    Saturday, June 20, 2009 2:52 PM

Answers

  • Check your Visual Studio version first. Visual Studio 2005 and 2008 do not list Windows 7 as a supported platform, though it may be safe to assume you need to have a version supported on Windows Vista first, that means you need to have VS2005 Sp1 with Vista update or VS2008. 

    Reboot your machine to make sure no other program is using the file. If you still have this problem, run chkdisk. If chkdisk can not solve your problem, you may need to find another hard drive.
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
    Visual C++ MVP
    Saturday, June 20, 2009 5:10 PM

All replies

  • Run FileMon when you build and set the filter to pdb files. Usually it is because the file is opened by someone else, the disk is corrupt or the file path of the PD  contains non-ANSII charactors.
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
    Visual C++ MVP
    Saturday, June 20, 2009 3:09 PM
  • Might i add that i am 16 and am running Windows 7 RC Beta. I am new to C++ and need a NooB answer. Is it possibly because of my OS? Thank you for the answer but i don't quite understand.
    Saturday, June 20, 2009 3:38 PM
  • Check your Visual Studio version first. Visual Studio 2005 and 2008 do not list Windows 7 as a supported platform, though it may be safe to assume you need to have a version supported on Windows Vista first, that means you need to have VS2005 Sp1 with Vista update or VS2008. 

    Reboot your machine to make sure no other program is using the file. If you still have this problem, run chkdisk. If chkdisk can not solve your problem, you may need to find another hard drive.
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
    Visual C++ MVP
    Saturday, June 20, 2009 5:10 PM
  • You'll need to make up your mind.  Do you want to debug an operating system or do you want to learn to program?  Get your machine stable first if you prefer the latter.

    Hans Passant.
    Saturday, June 20, 2009 5:28 PM
  • nobugz and Sheng Jiang,

    I am not a noob (but no MVP either hehe) but found it interesting my google returned this answer.  I have recently moved a development  machine to the Windows 7 RC as well.  I too have been fiddling with the VS2005 and Win7.  I realize the the age and difference between the two is large (and unsupported). 

    I ran into this same error when I tried to recompile a small MFC app I have written.  I chose to try to stick with VS2005 as part of the libraries I use are only supported under VS2005 as well.  I have the same error the OP does.  Interestingly, when trying to just generate any kind of MFC framework app just using the wizard the whole enviroment crashes with the same error.  I did have all patches applied plus the ones that Win7 recommended upon installing and updating.

    I also have setup my VS 2005 to work just fine inside the Windows 7 Virtual XP Mode.  So to the OP if you wish to learn VC++ and you must have Windows 7 - use the XP Mode (Virtual PC BETA) and run VS inside that.  You may have a few hurtles to jump though getting all the patches installed etc, I have a post about this in the visualization forums on Windows 7.

    V.
    Wednesday, July 01, 2009 2:16 AM
  • I got the same thing when trying to build VS 2005 in Windows 7 RC:
    Fatal Error C1033: cannot open program database '' (with the database it couldn't open indicated as an empty string)
    I had my shortcut to VS 2005 set to compatibility mode for Windows XP SP3.  When I changed it to Windows Vista, I was able to build.
    Saturday, August 29, 2009 2:37 AM
  • The tip with setting the compatibility mode to Windows Vista (I choose Vista SP2) did the trick for me. Compatibility to Windows XP SP3 didn't help. Just as a side note: I'm using Windows 7 Ultimate and I have VS2005 installed with full patches (SP1 + SP1-vista KB932232)
    Tuesday, October 20, 2009 6:46 PM
  • You're a hero.
    I've uninstalled, re-installed and didn't look at the obvious.

    Wonderful, thank you.
    Friday, December 04, 2009 4:15 PM
  • If the file, or contained/containing folders are read only, this can also cause the same error message when compiling.
    • Proposed as answer by nan0fr0g Friday, December 04, 2009 8:07 PM
    Friday, December 04, 2009 8:07 PM
  • Because of legacy code I required VS 2003 witha at least SP1 on Windows7 to build C++.  I was able to reslove this problem by chosing compatibility mode Vista.  When I installed the program the defalult selection was XP service pack 3.

    • Proposed as answer by jones6 Thursday, May 13, 2010 8:06 PM
    Sunday, December 27, 2009 5:10 PM
  • Worked for me! Thanks.
    Thursday, January 07, 2010 8:00 PM
  • The same trick for Visual Studio C++ 2008 Express, change compatibility to Vista SP2, thanks:)

    Thursday, December 30, 2010 12:19 PM
  • note certain if this is it...:

    when you debug, but you didn't close out the earlier debug, you can get this message. Or at least when you use "CTRL" + "F5".

     

    Point being.. Make sure all instenses are closed. I would use task manager and make certain that the file you made is running, and just not showing up. :)

    Friday, January 28, 2011 11:23 PM
  • I had the same issue just a moment ago, thank you for your tip. +1 from me :)
    Friday, March 18, 2011 9:01 AM
  • The tip with setting the compatibility mode to Windows Vista (I choose Vista SP2) did the trick for me. Compatibility to Windows XP SP3 didn't help. Just as a side note: I'm using Windows 7 Ultimate and I have VS2005 installed with full patches (SP1 + SP1-vista KB932232)

    I was facing the same problem while building a openGL C++ code using VS2005 in Win 7. Then i changed the compatibility to windows vista sp2. Now its working fine. I guess this is the solution.

    Monday, January 09, 2012 8:02 AM
  • I faced with the same error: desktop PC with Windows7 and Visual Studio 2005.

    The problem occured only when opening the project double clicking the sln file.

    I solved setting compatibility mode for VS2005 to "Windows 7" (differently from what specified in previous posts that suggested "Vista SP2").

    Thank you to all for the suggestion.

    Wednesday, September 26, 2012 7:33 AM