Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Thread Tools Rate Thread Display Modes
Old 09-16-2009, 06:10 PM
ktak ktak is online now
Registered User
Join Date: 08-31-2009
Posts: 5
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.
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
' 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?
Reply With Quote
Old 09-22-2009, 08:18 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

All times are GMT -5. The time now is 11:21 PM.

Copyright 1999-2019 Kinook Software, Inc.