Solved

Visual Source Safe

Posted on 2001-07-12
7
402 Views
Last Modified: 2011-10-03
hi,
I am looking for detailed explanation / code Example on
how to do the following in VB , using VSS references:

1) Check out a file
2) Check in a file + Comments.
3) Get version X of file Y.

The VSS server is not sitting in the machine where
the vb app is running, but on server ZZZZ.

Thanks,

Eli.
0
Comment
Question by:eofek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 6279072
First, VSS is intended as a client-server app in your scenario.  You need to install the client version of VSS on the client.

Once you've done that, start VB with the desired project.

You will probably be asked if you'd like to check it into source safe.  If so, you'll need to do administation to set up the project.

1) Check out a file
  Simply right-click on the desired form/class/module in the VB Project window and near the bottom you'll see "Check Out"

2) Check in a file + Comments.
  When done modifying, right-click as above and select "Check In..."  In the next window, enter comments then click OK.

3) Get version X of file Y.
  Go to Source Safe and locate the version you want and select each file, then right-click and select View, then "check out this..."
0
 
LVL 2

Expert Comment

by:santhoshx
ID: 6279614
Open Visual Sourcesafe admin
First you have to create a database.
Goto Tools - Create Database
Choose the directory name or enter a new name

Then you have to create a user account in VSS.
Users - Adduser option

You have the options to set user rights etc in Tools menu itself.
----------------
Next Open  Microsoft Visual SourceSafe
Browse the directory where you have created the database
Type in user name and password

Visual Sourcesafe Explorer window will open with $ directory open.
Goto File- create project and create a project
Add the files required (your frm,vbp,frx files) by File- Add files option

Once you use add files to the sourcesafe it will get added to vss database. But you require  a directory to checkout files. You can set it by File - set working folder option.
When ever you checkout a file source safe will overwrite the local copy in this directory from the VSS database.

You can checkout files using vss or vb.
Tools - sourcesafe - Checkout
Select the forms or modules or files required

You can checkout the entire project from VSS by rightclicking on the project name and choosing check out option.

To get a specific version using Vb
Tools - sourcesafe - Show history
Click on Ok without entering form  or to
Now it will display all the versions
Choose the version and click Get button

When ever you make a change in a file and check in, it will update the VSS, and creates a new version.


 

0
 
LVL 6

Expert Comment

by:anthony_glenwright
ID: 6280027
I think he wants to know how to do it in code...

Theres an excellent article on how to do Sourcesafe automation on the MSDN web site, and there is a sample project for VB (the whole SourceSafe explorer, written in VB).  Go to http://msdn.microsoft.com/vstudio
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:santhoshx
ID: 6280349
yes Anthony. Now I think so. Any way he hasn't responded. Lets see
0
 
LVL 2

Expert Comment

by:chandukb
ID: 6280839
:ping:
0
 

Author Comment

by:eofek
ID: 6282026
Hi,
Sorry for the late response.
Anthony is very correct.
a sample project of a VSS written in VB is exactly what I need ( even better).
But I couldn't find it inthe link you gave.
Could you please give the full link to the download page of this specific sample ?
I tried looking for it but couldn't find it.

Thanks,

Eli.
0
 
LVL 6

Accepted Solution

by:
anthony_glenwright earned 200 total points
ID: 6282998
The article is here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvss/html/vssauto.asp

Good luck!

Note:  A tip - when you first use ...
Private WithEvents SourceSafeInstance As SourceSafeTypeLib.VSSApp

... to sink events, you will have problems in VB(6) because they used a VB reserved word in all the event templates...

Pretty silly, huh (-:   You can fix it by doing a search/replace, replacing all instance of "Local" with "strLocal" (I think thats the one - it was a while ago...)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question