SourceSafe: “Only one database connection at a time is supported.”

I’ve been having intermittent problems with Visual Studio 2005 and SourceSafe 2005 occasionally complaining that “Only one database connection at a time is supported” when I load up solutions with multiple projects in them.

A Microsoft Knowledge-base article pointed me to the potential problem. Looking in the mssccprj.scc files for  both .csproj files loaded in the solution, I spotted one of them had an extra entry for a .sln file as well as the .csproj file. Both of the SCC_Aux_Path variables for the .csproj definitions were the same so the knowledge-base fix wasn’t quite correct.

Removing the definition for the .sln file from the mssccprj.scc file has helped remove this problem. Saves doing the usual suggestion of ‘SourceSafe is screwed on your machine, you should get it reinstalled’.

3 thoughts on “SourceSafe: “Only one database connection at a time is supported.””

  1. Correct. For each project I had to remove the solution entry in the mssccprj.scc file. In addition, my Visual Studio solution file was saving over at My DocumentsVisual Studio 2008Projects instead of the working folder. In Visual Studio click on Change Source Control and double check your bindings.

  2. Thanks for that, it fixed it for me. After removing the .sln reference and making sure the URIs matched, I still had to remove and re-add the project to the solution for it to work.

    Good stuff, thanks –

  3. This actually relates to the perennial question about: should a solution (.sln) be in a folder by itself even if there’s only one project in it? This issue means that there is a reason to decide one way or another, and it’s “Yes”. (Unfortunately, since it’s not what I have usually done in the past).

    I’ll explain.

    Assume you have a solution “myProj.sln” and a project “myProj.csproj”. They can either be:
    (a) in the same folder …MyProj, or else
    (b) the solution in …MyProj and the project in …MyProjMyProj

    Note that Visual Studio gives you the option of either of these when creating new projects.

    In case (a), once added to SourceSafe, the file mssccprj.scc (which is a “Microsoft SourceSafe Status” file and is text), contains references to both the solution and the project files.
    In case (b), there is one mssccprj.scc in each directory. Obviously, the one in the solution directory refers to the solution file, etc.

    Here’s the rub. When you create a solution that also includes several of these projects (such as for an installer project, so you can include the “project output”), it has issues, as mentioned above, when encountering the mssccprj.scc files that contain both project and solution references (because the solution file is in the same place as the project file). You can edit the files as others have described (they are local to your file system and not in SourceSafe themselves, so not shared with others) and take out the .sln file references, but then the solution won’t bind properly when opened by itself.

    The only consistent way is to always have a solution in a root folder by itself and its own projects in folders below it. All solutions that produce DLLs should have at least two projects (eg the DLL and some kind of test harness exe) but EXE projects should still have a solution folder and a project subfolder even if there’s only one project. This means you should ALWAYS check the “Create directory for solution” check box when creating new projects using Visual Studio. Then your projects can be included in installers without meeting this problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.