Re: VB 5 app can't open local database



On Tue, 12 Dec 2006 11:12:14 -0000, "Steve Bowyer" <stephen.bowyer@xxxxxxxxxxxxxxxxxxx> wrote:

¤ My VB5 app uses an Access 97 database located on a shared drive. At certain
¤ times, the app also uses a small 97 .mdb in a folder on the user's local c
¤ drive. When properly installed on some new Fujitsu workstations, the app
¤ fails when trying to open this local .mdb with the message:
¤
¤ Error 3051. The Microsoft Jet database engine cannot open the file
¤ 'c:\rcanet\tempdb\temp.mdb'. It is already opened by another user, or you
¤ need permission to view its data.'
¤
¤ The code at this point is as follows:
¤
¤ On Error GoTo errorhandler
¤ Dim tdb As Database: Set tdb = ws.OpenDatabase("c:\rcanet\tempdb\temp.mdb")
¤ Dim invtab As Recordset: Set invtab = tdb.OpenRecordset("tempint")
¤ Dim sqla As String
¤ Dim myrset As Recordset
¤ 'Clear any records from the tempint table
¤ tdb.Execute "DELETE tempint.* FROM tempint;"
¤ Screen.MousePointer = 11
¤
¤ The same executable file for the app has been working fine on other older
¤ workstations, and the app continues to be able to open the main, remotely
¤ located .mdb on the new workstations. The new workstations are XP, the
¤ older ones are a mix of 2000 and XP.
¤
¤ Would be grateful for any tips as to what might be going on here.

You may want to check if any other processes are opening the file:

http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx

You can also check the .LDB file in order to see all the users who have a connection to the
database:

http://support.microsoft.com/kb/176670

BTW, Jet 4.0 databases (Access 2000 and higher) handle this issue better.


Paul
~~~~
Microsoft MVP (Visual Basic)
.



Relevant Pages

  • Re: Problems after installing Visual Basic 6 on XP Professional SP
    ... ¤ workstations and we generally restrict access to prevent them from messing up ... all of the machines. ...
    (microsoft.public.vb.general.discussion)
  • Re: Allowing .NET code to run from a network share
    ... ¤ Hi everyone, ... code needs to run on a number of workstations and having ... Instead of using CASPOL or the .NET Configuration MMC, can the security ...
    (microsoft.public.dotnet.framework)
  • Re: VB 5 app cant open local database
    ... the app also uses a small 97 .mdb in a folder on the user's ... When properly installed on some new Fujitsu workstations, ... Does the local folder have an LDB file left behind? ...
    (microsoft.public.vb.database)
  • Re: vb6 kill file in Vista
    ... ¤ Hi I have developed an app in vb6 which I am trying to port over to Vista. ... The files that I am trying to delete are all located in this install ...
    (microsoft.public.vb.general.discussion)
  • VB 5 app cant open local database
    ... My VB5 app uses an Access 97 database located on a shared drive. ... the app also uses a small 97 .mdb in a folder on the user's local c ... When properly installed on some new Fujitsu workstations, ... Dim myrset As Recordset ...
    (microsoft.public.vb.database)

Loading