That confirms that the file is definitely found. There must be no version
information. Assuming the Access database has a version, you probably need
to use a T-SQL query to retrieve it.
I have SQL Server databases where a row in one of the tables is a version
number, but I maintain that. Otherwise, the only version number I know of is
the version of the SQL Server instance. For that I use the @@VERSION
function in a T-SQL query. I use ADO in a VBScript program to query the
Master database in the instance and retrieve the result. I assume this would
work in Access, but I am not familiar with *.mde files. You may need to ask
in an Access newsgroup.
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
"John" <info@xxxxxx> wrote in message
> Hi Richard
> Thanks. The first box says True the second is blank.
> Thanks again.
> "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
> message news:OrWwx8gnJHA.1216@xxxxxx
>> John wrote:
>>> I am using below code to get the version of a compiled access database
>>> file (mde). The file exists at the location.
>>> set objFSO = CreateObject("Scripting.FileSystemObject")
>>> MsgBox objFSO.GetFileVersion("G:\My Path\My File.mde")
>>> The problem is that the msgbox displays blank hence version is not being
>>> returned. What am I missing?
>> If the file name and path are correct, then there is no file version
>> information available. Are you sure that G: is available to the script?
>> What happens if you code:
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>> strFile = "G:\My Path\My File.mde"
>> MsgBox objFSO.FileExists(strFile)
>> MsgBox objFSO.GetFileVersion(strFile)
>> Richard Mueller
>> MVP Directory Services
>> Hilltop Lab - http://www.rlmueller.net