Error Message: A history operation is already in progress

Error Message: A history operation is already in progress

Post by c2Vuc2libG » Wed, 01 Sep 2004 14:09:02


Hi All,

I am running the following code snippet and it is producing the error
"A history operation is already in progress"
when the "Exit For" statement is used in the inner for each loop. Can anyone
help with this?

-------------------------------------------------------------------------------
For Each fItem In oVSSProj.Items(False)
If fItem.Type = VSSItemType.VSSITEM_FILE Then
If fItem.IsCheckedOut Then
Console.WriteLine("Warning! The SourceSafe item " &
fItem.Name & " is currently checked out.")
End If
Try
For Each fVersion In
fItem.Versions(SourceSafeTypeLib.VSSFlags.VSSFLAG_RECURSNO)
If InStr(fVersion.Action, "V1.7.0.24") > 0 Then
If fItem.IsDifferent("\\Meladevsqlc2\k$\Company
Workspace\SQL\" & fItem.Name) Then
fItem.Get("\\Meladevsqlc2\k$\Company
Workspace\SQL\" & fItem.Name)
End If
Exit For
End If

Console.WriteLine(fItem.Name & "::" & fVersion.Action)
Next
Catch eX As Exception
Console.WriteLine(ex.Message)
End Try
End If
Nex
-------------------------------------------------------------------------------

Paul
 
 
 

Error Message: A history operation is already in progress

Post by Arthur Nes » Wed, 01 Sep 2004 21:43:38

Hi,

anyone

This is exactly the reason of such error.
You have to walk through whole history collection without breaking the loop,
even you've found what you need.
______________________________
With best wishes, Arthur Nesterovsky
Please visit my home page:
http://www.yqcomputer.com/

 
 
 

Error Message: A history operation is already in progress

Post by Arthur Nes » Thu, 02 Sep 2004 17:49:30

Hi,


If I not mistake, the C++ allows breaking the loop, so you can implement
some DLL to solve this task.

using

No, there is not.
____________________________
With best wishes, Arthur Nesterovsky
Please visit my home page:
http://www.yqcomputer.com/