473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Handling Version Numbers (Major.Minor.Build.Plateform)

52
Can someone point me in the right direction on how to use Version Numbers within Access? I have a database were its primary goal is to track the versions of several projects. Since the version numbers are formatted as Major.Minor.Build.Plateform (1.01.01.01) I am unable to find a way to sort and or automatically update the version to the next appropriate version number. I was hoping someone could point me to some literature on best practices on how to deal with these types of numbers within Access.

Any help would be greatly appreciated.

Thanks
Birky
Apr 2 '08 #1
2 4279
ADezii
8,834 Expert 8TB
Can someone point me in the right direction on how to use Version Numbers within Access? I have a database were its primary goal is to track the versions of several projects. Since the version numbers are formatted as Major.Minor.Build.Plateform (1.01.01.01) I am unable to find a way to sort and or automatically update the version to the next appropriate version number. I was hoping someone could point me to some literature on best practices on how to deal with these types of numbers within Access.

Any help would be greatly appreciated.

Thanks
Birky
This would be the general idea:
Expand|Select|Wrap|Line Numbers
  1. Dim strVerNumber As String
  2. Dim strNewVerNumber As String
  3.  
  4. 'Retrieve the last Version Number for a specific ProjectID (1.01.01.01)
  5. strVerNumber = DLast("[Version]", "tblVersionNumbers","[ProjectID] = " & <Project ID>)
  6.  
  7. 'Let's say you wanted to increment the Minor Version Number (Major Version between 1 and 9)
  8. strNewVerNumber = Left$(strVerNumber, 2) & Format$(Val(Mid$(strVerNumber, 3, 2)) + 1, "00") & _
  9.                   Right$(strVerNumber, 6)
  10.  
  11. Debug.Print strNewVerNumber
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. 1.02.01.01
Apr 6 '08 #2
Birky
52
This would be the general idea:
Expand|Select|Wrap|Line Numbers
  1. Dim strVerNumber As String
  2. Dim strNewVerNumber As String
  3.  
  4. 'Retrieve the last Version Number for a specific ProjectID (1.01.01.01)
  5. strVerNumber = DLast("[Version]", "tblVersionNumbers","[ProjectID] = " & <Project ID>)
  6.  
  7. 'Let's say you wanted to increment the Minor Version Number (Major Version between 1 and 9)
  8. strNewVerNumber = Left$(strVerNumber, 2) & Format$(Val(Mid$(strVerNumber, 3, 2)) + 1, "00") & _
  9.                   Right$(strVerNumber, 6)
  10.  
  11. Debug.Print strNewVerNumber
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. 1.02.01.01

Thanks for the information but I was able to extract the needed information by using the below code.

Expand|Select|Wrap|Line Numbers
  1.     Dim i As Integer
  2.  
  3.     output_prefixStr = ""
  4.     output_suffixStr = ""
  5.  
  6.     If Not IsNull(input_inStr) Then
  7.         ' inStr has something, so parse it
  8.         If InStr(1, input_inStr, ".", vbTextCompare) = 0 Then
  9.             ' inStr has no dot, so suffix=inStr, and we're done
  10.             output_suffixStr = input_inStr
  11.         Else
  12.             ' inStr has at least one dot, so find position of rightmost dot
  13.             i = Len(input_inStr)
  14.             While InStr(i, input_inStr, ".") = 0 And i > 0
  15.                 i = i - 1
  16.             Wend
  17.             ' set prefixStr as all text left of dot, and suffixStr as all text right of dot
  18.             output_prefixStr = Left(input_inStr, i - 1)
  19.             output_suffixStr = Right(input_inStr, Len(input_inStr) - i)
  20.         End If
  21.     End If
Thanks again
Birky
Apr 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: frazan | last post by:
Hi, maybe it's a stupid question... I never have understood the real meaning of software version number, and when I must change it? There's some standard, where over Internet, can I find it? I...
5
by: mekim | last post by:
Hello....I am trying to System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version.ToString () ; to display the version of the app...but it remains static and therefore does not...
1
by: Tom | last post by:
I have two version numbers - one for my application and another from a manifest, database, whatever - that isn't important. Now that I have these two version numbers (in the form...
4
by: Mike L | last post by:
Error occurs on "System.Deployment.Application.ApplicationDeployment.CurrentDeployment" ** Here is my code private void frmMain_Load(object sender, System.EventArgs e) {...
1
by: theWizard1 | last post by:
Using Asp.NET 2.0. I published my web application to the server using the publish to website feature of asp.net 2.0. In VS.Net 2005 IDE, on solution explorer, at top level just below solution, I...
6
by: Gavin Sullivan | last post by:
I've been using the date (in YMMDD) format for the build number in the AssemblyVersion attribute. However, it appears that numbers 65534 are invalid!! Bit of a bummer for 2007!!! Is there a...
3
by: Zim Babwe | last post by:
I have been making changes to my Windows Application and in the Project/Properties the Publish Version shows the following: Major: 1 Minor: 0 Build: 0 Revision: 45 I would like to show this...
2
by: -Lost | last post by:
That pretty much sums it up. I am looking for information or tips on how to version your source code. What I have always done is this: major_build.minor_build.daily_build major_build - I...
15
by: bg_ie | last post by:
Hi, I have the following class - class TestOutcomes: PASSED = 0 FAILED = 1 ABORTED = 2 plus the following code -
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.