"File Already in use" error

  • Thread starter Thread starter diarmuidq
  • Start date Start date
D

diarmuidq

Hi
In my front end, the user picks which company he wishes to view. Each
company has a 3 digit code, e.g. 006. The frontend then relinks the tables
to point to the appropiate backend. I do this through code as follows

DoCmd.DeleteObject acTable, stTable ' Delete the current link
DoCmd.TransferDatabase acLink, "Microsoft Access" , stPath, acTable,
stTable, stTable ' Link the same table from new backend

All works fine until now! My customer switched to Windows XP, and now there
is problems. The first time is fine but after that it seems to remain open.
Even though there is no ldb. If you try copy or open the backend, you get
the same message - "File already in use". In Access you get the message

3045: Could not use 'F:\Stock\006\WestData.mdb'; file already in use.

I've replicated the problem on an XP machine. There is no problem on a
windows 2000 or 98 PC. The specifics are
PC OS: Windows XP Service Pack 1
Server OS: Windows 2000 Server
Office: Office 2000 Service Pack 3

Any ideas?
Thanks
Diarmuid
 
Hi Diarmuid,

I am going to set up the environment to test the scenario you mentioned,
currently, I understand the environment is as follows:

1. The database is shared on the Server Widows 2000 Server SP3.
2. The clients have Windows XP SP1 and Office 2000 SP3 installed.
3. The link table is linked via UNC Path, such as
\\win2k-server\share\sample.mdb, in stead of other method such as ODBC.

Once I have anything found, I will get back to you soon. Meanwhile, I you
have any additional information, please feel free to post them.
 
Thanks. 1 and 2 are correct. The data is not linked through UNC, the drive
letter is specified.e.g. stPath = 'F:\Stock\006\WestData.mdb'

The program works fine if I use a different linking method. Using code from
the Solutions database, (Use Multiple Databases - Link Tables aty startup)
there is no problem. As in

tbDef.Connect = stPath
Err = 0
On Error Resume Next
tbDef.RefreshLink
Still, I have several sites where I use the DoCmd.TransferDatabase method,
so I'd like to know how to solve it.

Regards
Diarmuid
 
Hi Diarmuid,

I setup the following environments and did test:

1. Widows 2000 Server SP3 as the Server.
2. Windows XP SP1 with Office 2000 SP3 as the clients.

Test 1
====
Dim stPath As String
Dim stTable As String

'stPath = "c:\NorthWind.mdb"
stTable = "customers"

' Delete the current link

DoCmd.DeleteObject acTable, stTable

' Link the same table from new backend

DoCmd.TransferDatabase acLink, "Microsoft Access", stPath, acTable,
stTable, stTable

The above code runs on Windows XP SP1 with Office 2000 SP3, it works fine.
The link table is linking to the local disk database file instead of the
Server.

Test 2
===
Test 2 just changes the path to the shared database from the Server Windows
2000 SP3.

stPath = \\win2k-sqlserver\tempc\NorthWind.mdb

It still works fine.

Based on your message, you mentioned the link table is linking to local
disk database source like F:\db.mdb, if so, Windows 2000 is not related to
the issue since it actually doesn't play any role? Or you developed the
application on Windows 2000 SP3 and then transfer the front-end and
back-end database file to the clients? Would you please post the structure?

Generally, since the issue only occurs on Windows XP client, I would
suggest the customer go to http://windowsupdate.microsoft.com, scan updates
and install the critical updates and service patch. In addition, for
testing purpose, we can create a simple database file and send it to the
clients, to make sure the issue isn't related to other parts of the
original database application.

Please feel free to let me know if the above information helps or you need
further assistance.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: "diarmuidq" <[email protected]>

|
| Thanks. 1 and 2 are correct. The data is not linked through UNC, the drive
| letter is specified.e.g. stPath = 'F:\Stock\006\WestData.mdb'
|
| The program works fine if I use a different linking method. Using code
from
| the Solutions database, (Use Multiple Databases - Link Tables aty startup)
| there is no problem. As in
|
| tbDef.Connect = stPath
| Err = 0
| On Error Resume Next
| tbDef.RefreshLink
| Still, I have several sites where I use the DoCmd.TransferDatabase method,
| so I'd like to know how to solve it.
|
| Regards
| Diarmuid
|
|
| | > Hi Diarmuid,
| >
| > I am going to set up the environment to test the scenario you mentioned,
| > currently, I understand the environment is as follows:
| >
| > 1. The database is shared on the Server Widows 2000 Server SP3.
| > 2. The clients have Windows XP SP1 and Office 2000 SP3 installed.
| > 3. The link table is linked via UNC Path, such as
| > \\win2k-server\share\sample.mdb, in stead of other method such as ODBC.
| >
| > Once I have anything found, I will get back to you soon. Meanwhile, I
you
| > have any additional information, please feel free to post them.
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Product Support Services
| > Microsoft Corporation
| > Get Secure! - <www.microsoft.com/security>
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| >
| > --------------------
| > | From: "diarmuidq" <[email protected]>
| > | Subject: "File Already in use" error
| > |
| > | Hi
| > | In my front end, the user picks which company he wishes to view.
| Each
| > | company has a 3 digit code, e.g. 006. The frontend then relinks the
| tables
| > | to point to the appropiate backend. I do this through code as follows
| > |
| > | DoCmd.DeleteObject acTable, stTable ' Delete the current link
| > | DoCmd.TransferDatabase acLink, "Microsoft Access" , stPath, acTable,
| > | stTable, stTable ' Link the same table from new backend
| > |
| > | All works fine until now! My customer switched to Windows XP, and now
| > there
| > | is problems. The first time is fine but after that it seems to remain
| > open.
| > | Even though there is no ldb. If you try copy or open the backend, you
| get
| > | the same message - "File already in use". In Access you get the
message
| > |
| > | 3045: Could not use 'F:\Stock\006\WestData.mdb'; file already in use.
| > |
| > | I've replicated the problem on an XP machine. There is no problem on a
| > | windows 2000 or 98 PC. The specifics are
| > | PC OS: Windows XP Service Pack 1
| > | Server OS: Windows 2000 Server
| > | Office: Office 2000 Service Pack 3
| > |
| > | Any ideas?
| > | Thanks
| > | Diarmuid
| > |
| > |
| > |
| >
|
|
|
 
I should have been clearer about the path. In my case, the F drive is the
Windows 2000 server, not a local disk. The frontend is on the local disk,
with the various backends on the server. There is no locking issue with the
backends on the local drive of the XP Pc. Only a problem when the backend is
on the server.
It also runs fine on a Windows 2000 PC, with Windows 2000 server. Just seems
to be a problem on a XP PC.
I'll run the scan for updates to XP to see if theres any change.
Thanks
Diarmuid
 
Hi Diarmuid,

I create a mapping drive via Tools->Map Network Drive, however, the code
(deleting and creating link table) also works fine on my side;

Microsoft Access 2000 version Num: 9.0.6926 SP-3
Windows XP Professional SP1.

Does the issue only occur on one specific client? Or the issue is common on
the users who use Windows XP Pro SP1 with Access 2000 SP3? If the issue is
related to one client, it would be machine specific; if the issue happens
on all Windows XP clients, we can try to send the customer a piece of code
to make sure the issue is not related to other parts, the code like below
works fine, there could be some other part in the application causes the
issue.

Dim stPath As String
Dim stTable As String

'stPath = "F:\NorthWind.mdb"
stTable = "customers"

' Delete the current link

DoCmd.DeleteObject acTable, stTable

' Link the same table from new backend

DoCmd.TransferDatabase acLink, "Microsoft Access", stPath, acTable,
stTable, stTable

If you have any questions or concerns please feel free to reply to the
threads.




Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: "diarmuidq" <[email protected]>
| References: <[email protected]> <lSLM1rVmDHA.2808
| X-Tomcat-NG: microsoft.public.access.forms
|
| I should have been clearer about the path. In my case, the F drive is the
| Windows 2000 server, not a local disk. The frontend is on the local disk,
| with the various backends on the server. There is no locking issue with
the
| backends on the local drive of the XP Pc. Only a problem when the backend
is
| on the server.
| It also runs fine on a Windows 2000 PC, with Windows 2000 server. Just
seems
| to be a problem on a XP PC.
| I'll run the scan for updates to XP to see if theres any change.
| Thanks
| Diarmuid
|
|
|
| | > Hi Diarmuid,
| >
| > I setup the following environments and did test:
| >
| > 1. Widows 2000 Server SP3 as the Server.
| > 2. Windows XP SP1 with Office 2000 SP3 as the clients.
| >
| > Test 1
| > ====
| > Dim stPath As String
| > Dim stTable As String
| >
| > 'stPath = "c:\NorthWind.mdb"
| > stTable = "customers"
| >
| > ' Delete the current link
| >
| > DoCmd.DeleteObject acTable, stTable
| >
| > ' Link the same table from new backend
| >
| > DoCmd.TransferDatabase acLink, "Microsoft Access", stPath, acTable,
| > stTable, stTable
| >
| > The above code runs on Windows XP SP1 with Office 2000 SP3, it works
fine.
| > The link table is linking to the local disk database file instead of the
| > Server.
| >
| > Test 2
| > ===
| > Test 2 just changes the path to the shared database from the Server
| Windows
| > 2000 SP3.
| >
| > stPath = \\win2k-sqlserver\tempc\NorthWind.mdb
| >
| > It still works fine.
| >
| > Based on your message, you mentioned the link table is linking to local
| > disk database source like F:\db.mdb, if so, Windows 2000 is not related
to
| > the issue since it actually doesn't play any role? Or you developed the
| > application on Windows 2000 SP3 and then transfer the front-end and
| > back-end database file to the clients? Would you please post the
| structure?
| >
| > Generally, since the issue only occurs on Windows XP client, I would
| > suggest the customer go to http://windowsupdate.microsoft.com, scan
| updates
| > and install the critical updates and service patch. In addition, for
| > testing purpose, we can create a simple database file and send it to the
| > clients, to make sure the issue isn't related to other parts of the
| > original database application.
| >
| > Please feel free to let me know if the above information helps or you
need
| > further assistance.
| >
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Product Support Services
| > Microsoft Corporation
| > Get Secure! - <www.microsoft.com/security>
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| >
| > --------------------
| > | From: "diarmuidq" <[email protected]>
| >
| > |
| > | Thanks. 1 and 2 are correct. The data is not linked through UNC, the
| drive
| > | letter is specified.e.g. stPath = 'F:\Stock\006\WestData.mdb'
| > |
| > | The program works fine if I use a different linking method. Using code
| > from
| > | the Solutions database, (Use Multiple Databases - Link Tables aty
| startup)
| > | there is no problem. As in
| > |
| > | tbDef.Connect = stPath
| > | Err = 0
| > | On Error Resume Next
| > | tbDef.RefreshLink
| > | Still, I have several sites where I use the DoCmd.TransferDatabase
| method,
| > | so I'd like to know how to solve it.
| > |
| > | Regards
| > | Diarmuid
| > |
| > |
| > | | > | > Hi Diarmuid,
| > | >
| > | > I am going to set up the environment to test the scenario you
| mentioned,
| > | > currently, I understand the environment is as follows:
| > | >
| > | > 1. The database is shared on the Server Widows 2000 Server SP3.
| > | > 2. The clients have Windows XP SP1 and Office 2000 SP3 installed.
| > | > 3. The link table is linked via UNC Path, such as
| > | > \\win2k-server\share\sample.mdb, in stead of other method such as
| ODBC.
| > | >
| > | > Once I have anything found, I will get back to you soon. Meanwhile,
I
| > you
| > | > have any additional information, please feel free to post them.
| > | >
| > | >
| > | > Sincerely,
| > | >
| > | > Alick Ye, MCSD
| > | > Product Support Services
| > | > Microsoft Corporation
| > | > Get Secure! - <www.microsoft.com/security>
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | >
| > | >
| > | > --------------------
| > | > | From: "diarmuidq" <[email protected]>
| > | > | Subject: "File Already in use" error
| > | > |
| > | > | Hi
| > | > | In my front end, the user picks which company he wishes to
view.
| > | Each
| > | > | company has a 3 digit code, e.g. 006. The frontend then relinks
the
| > | tables
| > | > | to point to the appropiate backend. I do this through code as
| follows
| > | > |
| > | > | DoCmd.DeleteObject acTable, stTable ' Delete the current
link
| > | > | DoCmd.TransferDatabase acLink, "Microsoft Access" , stPath,
acTable,
| > | > | stTable, stTable ' Link the same table from new backend
| > | > |
| > | > | All works fine until now! My customer switched to Windows XP, and
| now
| > | > there
| > | > | is problems. The first time is fine but after that it seems to
| remain
| > | > open.
| > | > | Even though there is no ldb. If you try copy or open the backend,
| you
| > | get
| > | > | the same message - "File already in use". In Access you get the
| > message
| > | > |
| > | > | 3045: Could not use 'F:\Stock\006\WestData.mdb'; file already in
| use.
| > | > |
| > | > | I've replicated the problem on an XP machine. There is no problem
on
| a
| > | > | windows 2000 or 98 PC. The specifics are
| > | > | PC OS: Windows XP Service Pack 1
| > | > | Server OS: Windows 2000 Server
| > | > | Office: Office 2000 Service Pack 3
| > | > |
| > | > | Any ideas?
| > | > | Thanks
| > | > | Diarmuid
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 
Well so far, its only happened on one client. And it happens here in my own
office on our XP machines. I'm worried that as more clients switch to XP,
similiar incidents will occur.
 
Hi Diarmuid,

If it is confirmed the issue is just related to that piece of code; to find
the root cause, we can try to compare the difference between two Windows XP
machines: one works, the other doesn't; since the issue is machine
specific, we can narrow down the problem to be related to the different
components on computers. To resolve the issue, install all the patches as
the working machine does.

Most related component I think is to check the MDAC version:

HOW TO: Check for MDAC Version
http://support.microsoft.com/?id=301202

Please feel free to reply to the threads if you have any questions or
concerns.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "diarmuidq" <[email protected]>
| References: <[email protected]> <lSLM1rVmDHA.2808
| X-Tomcat-NG: microsoft.public.access.forms
|
| Well so far, its only happened on one client. And it happens here in my
own
| office on our XP machines. I'm worried that as more clients switch to XP,
| similiar incidents will occur.
|
| | > Hi Diarmuid,
| >
| > I create a mapping drive via Tools->Map Network Drive, however, the code
| > (deleting and creating link table) also works fine on my side;
| >
| > Microsoft Access 2000 version Num: 9.0.6926 SP-3
| > Windows XP Professional SP1.
| >
| > Does the issue only occur on one specific client? Or the issue is common
| on
| > the users who use Windows XP Pro SP1 with Access 2000 SP3? If the issue
is
| > related to one client, it would be machine specific; if the issue
happens
| > on all Windows XP clients, we can try to send the customer a piece of
code
| > to make sure the issue is not related to other parts, the code like
below
| > works fine, there could be some other part in the application causes the
| > issue.
| >
| > Dim stPath As String
| > Dim stTable As String
| >
| > 'stPath = "F:\NorthWind.mdb"
| > stTable = "customers"
| >
| > ' Delete the current link
| >
| > DoCmd.DeleteObject acTable, stTable
| >
| > ' Link the same table from new backend
| >
| > DoCmd.TransferDatabase acLink, "Microsoft Access", stPath, acTable,
| > stTable, stTable
| >
| > If you have any questions or concerns please feel free to reply to the
| > threads.
| >
| >
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Product Support Services
| > Microsoft Corporation
| > Get Secure! - <www.microsoft.com/security>
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| >
| > --------------------
| > | From: "diarmuidq" <[email protected]>
| > | References: <[email protected]> <lSLM1rVmDHA.2808
| > | X-Tomcat-NG: microsoft.public.access.forms
| > |
| > | I should have been clearer about the path. In my case, the F drive is
| the
| > | Windows 2000 server, not a local disk. The frontend is on the local
| disk,
| > | with the various backends on the server. There is no locking issue
with
| > the
| > | backends on the local drive of the XP Pc. Only a problem when the
| backend
| > is
| > | on the server.
| > | It also runs fine on a Windows 2000 PC, with Windows 2000 server. Just
| > seems
| > | to be a problem on a XP PC.
| > | I'll run the scan for updates to XP to see if theres any change.
| > | Thanks
| > | Diarmuid
| > |
| > |
| > |
| > | | > | > Hi Diarmuid,
| > | >
| > | > I setup the following environments and did test:
| > | >
| > | > 1. Widows 2000 Server SP3 as the Server.
| > | > 2. Windows XP SP1 with Office 2000 SP3 as the clients.
| > | >
| > | > Test 1
| > | > ====
| > | > Dim stPath As String
| > | > Dim stTable As String
| > | >
| > | > 'stPath = "c:\NorthWind.mdb"
| > | > stTable = "customers"
| > | >
| > | > ' Delete the current link
| > | >
| > | > DoCmd.DeleteObject acTable, stTable
| > | >
| > | > ' Link the same table from new backend
| > | >
| > | > DoCmd.TransferDatabase acLink, "Microsoft Access", stPath, acTable,
| > | > stTable, stTable
| > | >
| > | > The above code runs on Windows XP SP1 with Office 2000 SP3, it works
| > fine.
| > | > The link table is linking to the local disk database file instead of
| the
| > | > Server.
| > | >
| > | > Test 2
| > | > ===
| > | > Test 2 just changes the path to the shared database from the Server
| > | Windows
| > | > 2000 SP3.
| > | >
| > | > stPath = \\win2k-sqlserver\tempc\NorthWind.mdb
| > | >
| > | > It still works fine.
| > | >
| > | > Based on your message, you mentioned the link table is linking to
| local
| > | > disk database source like F:\db.mdb, if so, Windows 2000 is not
| related
| > to
| > | > the issue since it actually doesn't play any role? Or you developed
| the
| > | > application on Windows 2000 SP3 and then transfer the front-end and
| > | > back-end database file to the clients? Would you please post the
| > | structure?
| > | >
| > | > Generally, since the issue only occurs on Windows XP client, I would
| > | > suggest the customer go to http://windowsupdate.microsoft.com, scan
| > | updates
| > | > and install the critical updates and service patch. In addition, for
| > | > testing purpose, we can create a simple database file and send it to
| the
| > | > clients, to make sure the issue isn't related to other parts of the
| > | > original database application.
| > | >
| > | > Please feel free to let me know if the above information helps or
you
| > need
| > | > further assistance.
| > | >
| > | >
| > | >
| > | > Sincerely,
| > | >
| > | > Alick Ye, MCSD
| > | > Product Support Services
| > | > Microsoft Corporation
| > | > Get Secure! - <www.microsoft.com/security>
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | >
| > | >
| > | > --------------------
| > | > | From: "diarmuidq" <[email protected]>
| > | >
| > | > |
| > | > | Thanks. 1 and 2 are correct. The data is not linked through UNC,
the
| > | drive
| > | > | letter is specified.e.g. stPath = 'F:\Stock\006\WestData.mdb'
| > | > |
| > | > | The program works fine if I use a different linking method. Using
| code
| > | > from
| > | > | the Solutions database, (Use Multiple Databases - Link Tables aty
| > | startup)
| > | > | there is no problem. As in
| > | > |
| > | > | tbDef.Connect = stPath
| > | > | Err = 0
| > | > | On Error Resume Next
| > | > | tbDef.RefreshLink
| > | > | Still, I have several sites where I use the DoCmd.TransferDatabase
| > | method,
| > | > | so I'd like to know how to solve it.
| > | > |
| > | > | Regards
| > | > | Diarmuid
| > | > |
| > | > |
| > | > | | > | > | > Hi Diarmuid,
| > | > | >
| > | > | > I am going to set up the environment to test the scenario you
| > | mentioned,
| > | > | > currently, I understand the environment is as follows:
| > | > | >
| > | > | > 1. The database is shared on the Server Widows 2000 Server SP3.
| > | > | > 2. The clients have Windows XP SP1 and Office 2000 SP3
installed.
| > | > | > 3. The link table is linked via UNC Path, such as
| > | > | > \\win2k-server\share\sample.mdb, in stead of other method such
as
| > | ODBC.
| > | > | >
| > | > | > Once I have anything found, I will get back to you soon.
| Meanwhile,
| > I
| > | > you
| > | > | > have any additional information, please feel free to post them.
| > | > | >
| > | > | >
| > | > | > Sincerely,
| > | > | >
| > | > | > Alick Ye, MCSD
| > | > | > Product Support Services
| > | > | > Microsoft Corporation
| > | > | > Get Secure! - <www.microsoft.com/security>
| > | > | >
| > | > | > This posting is provided "AS IS" with no warranties, and confers
| no
| > | > | rights.
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | From: "diarmuidq" <[email protected]>
| > | > | > | Subject: "File Already in use" error
| > | > | > |
| > | > | > | Hi
| > | > | > | In my front end, the user picks which company he wishes to
| > view.
| > | > | Each
| > | > | > | company has a 3 digit code, e.g. 006. The frontend then
relinks
| > the
| > | > | tables
| > | > | > | to point to the appropiate backend. I do this through code as
| > | follows
| > | > | > |
| > | > | > | DoCmd.DeleteObject acTable, stTable ' Delete the
current
| > link
| > | > | > | DoCmd.TransferDatabase acLink, "Microsoft Access" , stPath,
| > acTable,
| > | > | > | stTable, stTable ' Link the same table from new backend
| > | > | > |
| > | > | > | All works fine until now! My customer switched to Windows XP,
| and
| > | now
| > | > | > there
| > | > | > | is problems. The first time is fine but after that it seems to
| > | remain
| > | > | > open.
| > | > | > | Even though there is no ldb. If you try copy or open the
| backend,
| > | you
| > | > | get
| > | > | > | the same message - "File already in use". In Access you get
the
| > | > message
| > | > | > |
| > | > | > | 3045: Could not use 'F:\Stock\006\WestData.mdb'; file already
in
| > | use.
| > | > | > |
| > | > | > | I've replicated the problem on an XP machine. There is no
| problem
| > on
| > | a
| > | > | > | windows 2000 or 98 PC. The specifics are
| > | > | > | PC OS: Windows XP Service Pack 1
| > | > | > | Server OS: Windows 2000 Server
| > | > | > | Office: Office 2000 Service Pack 3
| > | > | > |
| > | > | > | Any ideas?
| > | > | > | Thanks
| > | > | > | Diarmuid
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 
Back
Top