Wiki Home

Visual Source Safe Integration

Namespace: WIN_COM_API
You can automatically integrate Visual Source Safe with your Visual FoxPro Project Manager. See under Tools - Options - Projects.

[2008.04.02] Category Needs Refactoring -- years later -- I think this is a *great* topic that just needs to transition from Thread Mode to Document Mode. -- Steven Black

The question addressed below is should you use the integration or not?

A better, enhanced and faster version of SCCTEXT.PRG is available at the ProLib Archives:
A great link detailing how to do this is in the MS Knowledge Base:

In case they change the link on that, the Article ID is Q157636 Offsite link to;EN-US;Q157636
-- Bill Mason

From January 2014 there is a new tool to replace SCCTEXT(X).PRG called Fox Bin 2 Prg
It's hosted on VFPx and allow bidirectional convertion binary<->text, so it can be used with almost any SCM tool. -- Fernando DBozzo

April 2000: Hot fix that significantly improves Visual Source Safe Integration performance. Q228927 Offsite link to;EN-US;Q228927

Could you be more specific? After spending almost 2 hours navigating web pages, making phone calls and choosing automated phone menu selections, I have yet to find anyone who knows what VSS is and that such a fix exists.

Don't bother trying to determine if the Hot Fix applies to you - GET IT. Call Microsoft support, mention the article number and get this fix. I reduced my project load times from 6 minutes to 10 seconds!!!! It also dramatically reduces the time to perform any other VFP/VSS integration function (check out/check in/update project list/get latest version etc..). The difference is nothing short of astounding. I'm very disappointed in the fact that Microsoft sat on this fix for six months without making a public announcement to VFP developers. We've always used the integration and have loved it except for the project load time issue.

I can't believe they didn't distribute this automatically with MSDN Universal subscriptions!! Call Support?! Please... -- Rox

This is included in VS6 SP5 -- Paul Grover
BTW, VS6 SP5 didn't seem to fix for us. We have about 3 machines which run VSS blindingly fast compared to the others, all had SP5 applied - Walter Nicholls

The links above no longer mention a hotfix, would you post the URL. Are we sure it's not included with the Universal Subscription? what is it's filename? Michael Schwaid
The benefits of Visual FoxPro's implementation of Source Code Control Integration are:
  • By and large it keeps developers out of the source code control client application. This is a benefit because it is much more productive to have the Project Manager track the availablity of files rather than relying on the developer to remember. Huh? This makes no sense since the information in the VSS client is, in fact, much better and more complete than in the PM.-- Steven Black If nothing else, you won't have to switch between the two apps, which in itself will save you some time. -- Dan LeClair

    Actually, I find the switch relatively painless. The time wasted by the project manager's redrawing of the checked in / checked out icon takes much longer. -- Mike Yearwood

  • The Project Manager displays the current source code control status for each file. The same information from the source control client displayed in the Project Manager. ... forcing you to use the PM.-- Steven Black.
    Steve, Forcing you to use the VSS interface if you don't use the PM. At least the PM is part of the VFP IDE.

  • The option to "Join a Source Control Project" allows developers to easily work with many different projects. This can also help with managing files common to many projects.
  • Binary file comparision. Since much of Visual FoxPro source code is stored in binary files (Fox tables) the ability to compare versions of these binary files is crucial, particularly for forms and class libraries.
    This is largely the fault of some arbitrary belief that storing multiple classes / procedures in fewer classlibs / procedure libraries is somehow better than having more separate files. The larger the classlib the more crucial and harder it becomes to track differences. See VFPSet Class Lib and VFPSet Procedure -- Mike Yearwood
    Visual FoxPro comes with source code integration, but you don't have to use it that way. In fact many developers I respect eschew source control integration and use the source control products interactively. There are many reasons for this. -- Steven Black

  • Sourcesafe gets progressively slower as its source database gets larger and this continues until it gets ridiculously slow.
    Yes, this is an issue, but it can be dealt with. Periodic purging of deleted files speeds VSS up noticably. Also, running the Analyzer occasionally will help eliminate problems. We had sixteen developers and close to twenty projects in VSS and speed was acceptable for the most part. -- Dan LeClair

    Maintain separate VSS databases for different projects. This keeps each database smaller, which means that maintenance routines run more quickly and day to day performance is much quicker.

  • The VFP integration provides few of the features and control available when using the Source Safe client interactively.
  • Irritating Source Safe dialogs come up and clutter your VFP desktop
  • The integration is managed with poorly documented intermediate files that are prone to being forgotten or erased as you copy files around in your development environment.
  • It forces you use the project manager (yech!) as your console. This was cool in FP2.x, not anymore given the CLass Browser, the Component Gallery, and frameworks that set smart pathing on a project by project basis.-- Steven Black
    I personally still use the project manager to access the files of my application. Also, I am sure someone could build an add-in for the class browser that synchronizes with the project manager and source control. -- Bob Archer

  • VFP integration cannot handle shared VSS projects very well. The trouble comes when you want to add a new program to your SHARED folder from the PJX of your application. You simply cannot do these sorts of operations with integration. You will add the program file to your application. The workaround is to create an application that holds all your shared programs then share the programs directory. When you want to add a program, you'd have to JOIN that project and add the program.
  • Cannot LABEL versions of the project.
  • Integration can't handle any files that are not in the project tree. So, if you have documentation included in "other files" you could not have that in a different location, unless that location was under your project's main directory.
    This is no longer true. I am not sure when it changed, but Steve Bodnar pointed it out to me last year. I just tested it and as long as there is a project folder in your source control provider for the other project, it works great. --Toni Feltman


    I use Visual FoxPro's Source Code Control Integration with success and with one exception (see Cons) find it to be stable and well implemented. -- ?jMM
    You are not the only one, I, too, use the Project Manager with the built-in Source Code Control Integration. -- Christof Wollenhaupt

    The performance issue in Cons #1 is not caused by Source Code Control Integration and not using Source Code Control Integration does not address the issue. -- jMM John, the pathetic performance of VSS under VFP integration with N>1 users is so obvious, so universal that I'm wondering if we are even discussing the same topic here. I reiterate that I am referring to team deployment. Of course integration works like a peach when used alone or a couple of people. -- Steven Black

    Hmmm... of course Source Safe isn't the only game in town... although it is included with Visual Studio... you say it slows down with multiple users... could it perhaps use the Jet database? We haven't noticed these problems using PVCSVersion Manager and its SCI component. -- Bob Archer

    In Cons #2, what commonly used features are missing? I've integrated source code control with VFP and don't find myself going into the client often. -- jMM -- I'm not missing any features (including help) since I don't use integration anymore :-)-- Steven Black

    Steve, you dodged the question. From the Project manager you can checkin, checkout, get latest version, view history, compare, undo checkout, view scc status... (at least you can do all these things with the PVCSVersionManger SCI.) What is left that you would need to do? -- Bob Archer

    How about PIN, LABEL, MERGE, BRANCH to name a few. Ray Kirk

    In Cons #3, Many/most of these can be suppressed by the proper configuration of VFP and VSS. -- Which is, or is documented where, exactly?-- Steven Black

    In Cons #4, The only file I've had problems with is the PJM file. Visual FoxPro source code control integration does not properly manage the checking in and out of this file requiring the developer to do this manually. This is an issue whenever files are added to or removed from a project. I've found this irritating but not worth giving up integration. -- jMM

    I agree... that PJM crap doesn't work... it also assumes you are using Source Safe which merges text files by default when check out. Do this manually. -- Bob Archer

    One of the limitations of VSS only comes into play when you have multiple people working on a VFP COM project. The GUID is not stored by VSS and when a second user joins the project, their project is generated with a different GUID from the original project. -- William OConnor

    Speeding up Project Load Times

    And when it takes a long time to open the project in VFP, you can always use a little program like this one:

    Note: Modified by Michael GEmmons to check if the project is already opened. This prevents problems when you have this program in your startup and you have "open last project on startup" turned on in VFP options.

    #define ccProject "myproject.pjx"
    local llAbort, lnProjectCount, lnCount
    llAbort = .f.
    lnProjectCount = application.projects.count
    for lnCount = 1 to lnProjectCount
       if ccProject $ LOWER(application.projects.item(lnCount).name)
          llAbort = .t.
    if !llAbort
       use (ccProject)
       replace all user with iif(local,"Y","N")
       replace all local with .t.
       modify project (ccProject) nowait
       use (ccProject) again shared
       replace all local with user=="Y"

    -- Christof Wollenhaupt
    I HATE Source Code Control Integration with the PM. It's a major pain in the a**! However, I find a lot of benefits to using the PM (like projecthooks, etc.) I keep going back and forth on whether or not to use VSS integration though. Today, I am ready to chuck it all since I can't get my project to re-join an existing VSS project (have no idea why. No errors, etc. Just refuses to join) This usually happens after we have machine swaps, etc. and like Steve said, copy files around. -- Randy Jean

    Hmm, re-join of what? The whole Project? Har Har ::)).
    You may copy elements in one connected project, (it's of help to "check out" related elements in front of copying).
    The only way to "reconnect" I know is:
    (1) delete all files releate to the pm (.pjx,.pjt,.pjm)
    (2)Within VSS Explorer, "Undo Check Out" of the PJM
    (3) Run "connect to source safe project" on file menu.
    Read VSS Help "Offline working"
    "Reconnect" - what does it mean?

    I just had my VFP9SP1 PJX/PJT blow up during a rebuild. PJT invalid, opening as a DBF won't fix it...

    So can I create a new project file, then reconnect to the existing VSS data store?

    Craig Roberts
    After reading all this is VSS worth it? When or at what point is it? I just checked and it looks like you have to be a premier msdn member to get the update? Whats up with that?
    John Durbin

    Source Control is definitely worth it. Using the Source Control Integration with Project Manager is what is in question here.

    I'm all for using the VSS integration in the VFP IDE and hope they add additional capabilities (like merge). Been using it for over 3 years now - boy am I glad they speeded up the performance with the hot fix!

    My update on this old topic: In a multi-developer environment don't use VSS nor VSS Integration anymore. There are many options out there, like SVN, Mercurial, Plastic SCM and others, that you can use with FoxPro. Even SCCAPI integration isn't desirable enymore, because it "blocks" the modified file, which have many disadventadges. You can now use modern SCM tools not only for Diff (like scctext), you can merge de binary generated text too using Fox Bin 2 Prg. Sorry to came late. -- Fernando DBozzo
    Category Development Tools, Category Configuration Management, Category Code Samples
  • ( Topic last updated: 2014.06.16 09:28:44 AM )