Solved

Visual Source Safe

Posted on 2001-07-12
7
400 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
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now