1.

Solve : File handling capabilities of VBScript?

Answer»

Hello all,

I have been tasked with finding out who has a file locked. Sounds relatively SIMPLE, but there are many interesting variables involved.

So far, we are using a dBASE 5 for DOS program that is DEFINITELY legacy. There are functions within dBASE that need to lock a file exclusive. Which means that only the user within the dBASE environment that has the file locked can use it.

What I was wondering, is if VBScript is able to read that file that is locked by dBASE. The locked file has information on which workstation locked the file and that is what I am trying to access.

Thanks,
MattInteresting question. If the dBase engine applies the lock, the OS may not see the table/file as locked. VBScript may be able to read the table/file.

Have you tried using ADO to access the database?

Code: [Select]Set cnn = CreateObject("ADODB.Connection")
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=pathtodatabase" & _
";Extended Properties=dBASE 5.0;"

Be sure to change pathtodatabase to something more appropriate. If you can successfully open the database, you should be able to extract whatever information you need.

Good LUCK.

Not much No EXPERIENCE with dBase and as you can see, with the terminology either.



Discussion

No Comment Found