By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.