473,411 Members | 2,186 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,411 software developers and data experts.

Need help: How do check the -FULL- Access version number in vb??

Hi,

Does anyone know how to read the full access version number in visual
basic? I need to know if the current program instance is SR-1 or SP-3,
etc...

I currently use:
DB_DAO = DBEngine.Version
DB_JET = CurrentDb().Version
DB_VERSION = Application.SysCmd(acSysCmdAccessVer)

DB_VERSION shows 9.0 ( I would like 9.03851 SD-1 for example)

But I need mote information! I am trying to find the computer/user
that corrupts my database.

Thx, in advance, Seansan
Nov 12 '05 #1
6 4925
On 1 Oct 2003 06:39:07 -0700, se*****@reeve.nl (seansan) wrote:

If you want the detailed version information, you'll need to inspect
the DLLs that make up the system. There are Windows APIs for that; I'm
sure you can find them in a good API reference.
Microsoft typically publishes the version numbers of the DLLs in each
service pack.

Corruption can be caused by incompatible versions, but also by a host
of other things. Bad network hardware is at the top of that list.

-Tom.

Hi,

Does anyone know how to read the full access version number in visual
basic? I need to know if the current program instance is SR-1 or SP-3,
etc...

I currently use:
DB_DAO = DBEngine.Version
DB_JET = CurrentDb().Version
DB_VERSION = Application.SysCmd(acSysCmdAccessVer)

DB_VERSION shows 9.0 ( I would like 9.03851 SD-1 for example)

But I need mote information! I am trying to find the computer/user
that corrupts my database.

Thx, in advance, Seansan


Nov 12 '05 #2
se*****@reeve.nl (seansan) wrote:
But I need mote information! I am trying to find the computer/user
that corrupts my database.


See the Determining the workstation which caused the corruption page at the Access
Corruption FAQ at my website.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #3
Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:<81********************************@4ax.com>. ..
On 1 Oct 2003 06:39:07 -0700, se*****@reeve.nl (seansan) wrote:

If you want the detailed version information, you'll need to inspect
the DLLs that make up the system. There are Windows APIs for that; I'm
sure you can find them in a good API reference.
This is what I am looking for, but I was hoping there would be a
reference to a function or su example that uses this...

I haven't been able to find it so far ...

Sean
Microsoft typically publishes the version numbers of the DLLs in each
service pack.

Corruption can be caused by incompatible versions, but also by a host
of other things. Bad network hardware is at the top of that list.

-Tom.

Hi,

Does anyone know how to read the full access version number in visual
basic? I need to know if the current program instance is SR-1 or SP-3,
etc...

I currently use:
DB_DAO = DBEngine.Version
DB_JET = CurrentDb().Version
DB_VERSION = Application.SysCmd(acSysCmdAccessVer)

DB_VERSION shows 9.0 ( I would like 9.03851 SD-1 for example)

But I need mote information! I am trying to find the computer/user
that corrupts my database.

Thx, in advance, Seansan

Nov 12 '05 #4
se*****@reeve.nl (seansan) wrote in news:cd2f8856.0310020506.4461d905
@posting.google.com:
Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:

<81********************************@4ax.com>...
On 1 Oct 2003 06:39:07 -0700, se*****@reeve.nl (seansan) wrote:

If you want the detailed version information, you'll need to inspect
the DLLs that make up the system. There are Windows APIs for that; I'm
sure you can find them in a good API reference.


This is what I am looking for, but I was hoping there would be a
reference to a function or su example that uses this...


This gives me
10.4302

Option Base 0
Option Explicit

Private Declare Sub CopyMemory _
Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Any, Source As Any, ByVal Length As Long)

Private Declare Function GetFileVersionInfo _
Lib "version.dll" Alias "GetFileVersionInfoA" _
(ByVal lptstrFilename As String, ByVal DWHandle As Long, _
ByVal dwLen As Long, lpData As Any) As Long

Private Declare Function GetFileVersionInfoSize _
Lib "version.dll" Alias "GetFileVersionInfoSizeA" _
(ByVal lptstrFilename As String, lpdwHandle As Long) As Long

Private Declare Function VerQueryValue _
Lib "version.dll" Alias "VerQueryValueA" _
(pBlock As Any, ByVal lpSubBlock As String, _
LPLPBuffer As Any, PULen As Long) As Long

Private Sub TestVersionNumber()
Debug.Print VersionNumber(SysCmd(acSysCmdAccessDir) & "\MsAccess.Exe")
End Sub

Public Function VersionNumber(ByVal FullPath As String) As String
Dim Buffer() As Byte
Dim DWHandle As Long
Dim FileVersionInfoSize As Long
Dim LPLPBuffer As Long
Dim SubVersion As Integer
Dim Version As Integer

FileVersionInfoSize = GetFileVersionInfoSize(FullPath, DWHandle)
If FileVersionInfoSize <> 0 Then
ReDim Buffer(FileVersionInfoSize)
GetFileVersionInfo FullPath, 0, FileVersionInfoSize, Buffer(0)
VerQueryValue Buffer(0), "\", LPLPBuffer, FileVersionInfoSize
ReDim Buffer(51)
CopyMemory Buffer(0), ByVal LPLPBuffer, 52
CopyMemory Version, Buffer(10), 2
CopyMemory SubVersion, Buffer(14), 2
VersionNumber = FullPath & " Version " & Version & "." & SubVersion
Else
VersionNumber = "Could Not Retrieve Version Information for " _
& FullPath
End If
End Function

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #5
Hi Lyle,

thanks for the code. I tried it and well I hate to say that it didnt
work on mys ide. I noticed you run version 10., I have 9. Maybe this
is where the problem lies. I only get 9.0 as the evrsion number. The
subversion number is not beeing returned. Annoying, as this was what I
was looking for.
seansan

Lyle Fairfield <Mi************@Invalid.Com> wrote in message news:<Xn*******************@130.133.1.4>...
se*****@reeve.nl (seansan) wrote in news:cd2f8856.0310020506.4461d905
@posting.google.com:
Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:

<81********************************@4ax.com>...
On 1 Oct 2003 06:39:07 -0700, se*****@reeve.nl (seansan) wrote:

If you want the detailed version information, you'll need to inspect
the DLLs that make up the system. There are Windows APIs for that; I'm
sure you can find them in a good API reference.


This is what I am looking for, but I was hoping there would be a
reference to a function or su example that uses this...


This gives me
10.4302

Option Base 0
Option Explicit

Private Declare Sub CopyMemory _
Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Any, Source As Any, ByVal Length As Long)

Private Declare Function GetFileVersionInfo _
Lib "version.dll" Alias "GetFileVersionInfoA" _
(ByVal lptstrFilename As String, ByVal DWHandle As Long, _
ByVal dwLen As Long, lpData As Any) As Long

Private Declare Function GetFileVersionInfoSize _
Lib "version.dll" Alias "GetFileVersionInfoSizeA" _
(ByVal lptstrFilename As String, lpdwHandle As Long) As Long

Private Declare Function VerQueryValue _
Lib "version.dll" Alias "VerQueryValueA" _
(pBlock As Any, ByVal lpSubBlock As String, _
LPLPBuffer As Any, PULen As Long) As Long

Private Sub TestVersionNumber()
Debug.Print VersionNumber(SysCmd(acSysCmdAccessDir) & "\MsAccess.Exe")
End Sub

Public Function VersionNumber(ByVal FullPath As String) As String
Dim Buffer() As Byte
Dim DWHandle As Long
Dim FileVersionInfoSize As Long
Dim LPLPBuffer As Long
Dim SubVersion As Integer
Dim Version As Integer

FileVersionInfoSize = GetFileVersionInfoSize(FullPath, DWHandle)
If FileVersionInfoSize <> 0 Then
ReDim Buffer(FileVersionInfoSize)
GetFileVersionInfo FullPath, 0, FileVersionInfoSize, Buffer(0)
VerQueryValue Buffer(0), "\", LPLPBuffer, FileVersionInfoSize
ReDim Buffer(51)
CopyMemory Buffer(0), ByVal LPLPBuffer, 52
CopyMemory Version, Buffer(10), 2
CopyMemory SubVersion, Buffer(14), 2
VersionNumber = FullPath & " Version " & Version & "." & SubVersion
Else
VersionNumber = "Could Not Retrieve Version Information for " _
& FullPath
End If
End Function

Nov 12 '05 #6
se*****@reeve.nl (seansan) wrote in
news:cd*************************@posting.google.co m:
Hi Lyle,

thanks for the code. I tried it and well I hate to say that it didnt
work on mys ide. I noticed you run version 10., I have 9. Maybe this
is where the problem lies. I only get 9.0 as the evrsion number. The
subversion number is not beeing returned. Annoying, as this was what I
was looking for.
seansan

Lyle Fairfield <Mi************@Invalid.Com> wrote in message
news:<Xn*******************@130.133.1.4>...
se*****@reeve.nl (seansan) wrote in news:cd2f8856.0310020506.4461d905
@posting.google.com:
> Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:

<81********************************@4ax.com>...
>> On 1 Oct 2003 06:39:07 -0700, se*****@reeve.nl (seansan) wrote:
>>
>> If you want the detailed version information, you'll need to inspect
>> the DLLs that make up the system. There are Windows APIs for that;
>> I'm sure you can find them in a good API reference.
>
> This is what I am looking for, but I was hoping there would be a
> reference to a function or su example that uses this...


This gives me
10.4302

Option Base 0
Option Explicit

Private Declare Sub CopyMemory _
Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Any, Source As Any, ByVal Length As Long)

Private Declare Function GetFileVersionInfo _
Lib "version.dll" Alias "GetFileVersionInfoA" _
(ByVal lptstrFilename As String, ByVal DWHandle As Long, _
ByVal dwLen As Long, lpData As Any) As Long

Private Declare Function GetFileVersionInfoSize _
Lib "version.dll" Alias "GetFileVersionInfoSizeA" _
(ByVal lptstrFilename As String, lpdwHandle As Long) As Long

Private Declare Function VerQueryValue _
Lib "version.dll" Alias "VerQueryValueA" _
(pBlock As Any, ByVal lpSubBlock As String, _
LPLPBuffer As Any, PULen As Long) As Long

Private Sub TestVersionNumber()
Debug.Print VersionNumber(SysCmd(acSysCmdAccessDir) &
"\MsAccess.Exe")
End Sub

Public Function VersionNumber(ByVal FullPath As String) As String
Dim Buffer() As Byte
Dim DWHandle As Long
Dim FileVersionInfoSize As Long
Dim LPLPBuffer As Long
Dim SubVersion As Integer
Dim Version As Integer

FileVersionInfoSize = GetFileVersionInfoSize(FullPath, DWHandle)
If FileVersionInfoSize <> 0 Then
ReDim Buffer(FileVersionInfoSize)
GetFileVersionInfo FullPath, 0, FileVersionInfoSize, Buffer(0)
VerQueryValue Buffer(0), "\", LPLPBuffer, FileVersionInfoSize
ReDim Buffer(51)
CopyMemory Buffer(0), ByVal LPLPBuffer, 52
CopyMemory Version, Buffer(10), 2
CopyMemory SubVersion, Buffer(14), 2
VersionNumber = FullPath & " Version " & Version & "." &
SubVersion
Else
VersionNumber = "Could Not Retrieve Version Information for " _
& FullPath
End If
End Function


When I get a chance I'll run it in 2K and see what I get.
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tiernan | last post by:
Hey everybody. I'm verry new to PHP and MYSQL and have been working on a form that when it is submitted stores the information into a mysql database. The main problem is that i'm trying to finish...
4
by: Tihon | last post by:
Hello! I again need your help, just can't understand whats going on. Got this upload pictures form and it's having problem handling large files (~1.5 - 2 MB). Everything works fine if i just...
4
by: Jeff Uchtman | last post by:
I am having trouble grasping this due to brain block or just lack of brain.. I and doing a CBool on 3 true or false. I need all 3 to answer true to display. If one or more are false it equals...
4
by: kazack | last post by:
I posted a similiar question in this newsgroup already and got an answer which I already knew but didn't get the answer I was looking for so I am reposting the code and question differently in the...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
11
by: Jack | last post by:
I have a asp form where among others there are few text boxes and one check box. The checkbox is to indicate whether the entry is final. The checkbox is attahced to a field in table of type...
66
by: genestarwing | last post by:
QUESTION: Write a program that opens and read a text file and records how many times each word occurs in the file. Use a binary search tree modified to store both a word and the number of times it...
14
by: ra7l | last post by:
hi all bleas h need help in cods GUI and Thread i need help function start () run() white () join () sleep ()
11
by: lakshmiram.saikia | last post by:
Hi, I need to do the following operation : '" I have two mac addresses, say X and Y,where X is the base mac address, and Y is the nth mac address from X, each incremented by one. Now,I want...
3
by: slowdance | last post by:
Hi! Im new in this forum.. Obviously I need help, Is there a way I can make a Custom Error Message using RaiseError statement? This is the problem, I want an error message whenever a user...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.