Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Duplicate build number after increment (https://www.kinook.com/Forum/showthread.php?t=4159)

ktak 09-16-2009 05:10 PM

Duplicate build number after increment
 
I am using VBP 6.5 and Window's Scheduled Task to trigger an automatic build. Within the build, there is a step that increments the build number and emails us with that information after a successful build.

The problem is that we often see duplicate build numbers.
ie.
.....
build 390 Success.
build 391 Success.
build 391 Success.
build 392 Success.
build 394 Success.
build 395 Success
......

This duplication occurs quite often, even when the builds are completing normally.

Below is the code for the incrementation step.

' retrieve the current BUILD_NUM macro from the global macros
' collection
Set objMacro = Application.Macros(vbldGlobal).Item("BUILD_NUM")

If objMacro Is Nothing Then
' if the macro doesn't exist yet, initialize to one
Application.Macros(vbldGlobal).Add "BUILD_NUM", "1"
Set objMacro = Application.Macros(vbldGlobal).Item("BUILD_NUM")
Builder.LogMessage "Incremented BUILD_NUM macro to " & objMacro.Value
Else
' otherwise increment the value
objMacro.Value = Clng(objMacro.Value)+1
Builder.LogMessage "Incremented BUILD_NUM macro to " & objMacro.Value
End If


Anyone else experience this issue?

kinook 09-22-2009 07:18 AM

http://www.kinook.com/Forum/showthre...?threadid=3044


All times are GMT -5. The time now is 02:38 AM.


Copyright © 1999-2023 Kinook Software, Inc.