I am hoping that someone can help me solve a problem I have run into with some Microsoft Access 2010 code. The code worked in 2007 version but is now having problems in 2010 version producing a runtime error (number stated above) and a message of "Could
not use "; file already in use."
The error is produced by the line of code directly above the comment line below:
---code start ---
Dim strSQL As String
Dim rs As New ADODB.Recordset
Dim conn As New ADODB.Connection
Dim x As Integer
Based on my research, this issue maybe a Windows NT permissions problem. The account that is accessing the page doesn't have sufficient permissions
to lock the database. The account would be either the anonymous account (by default the IUSR_<machinename>) or a specific user account if the page has been secured for authenticated access.
To resolve this issue, then:
If the page is meant to be accessed anonymously, give the IUSR_<machinename> account full control to the ASP page, and the folder and files
where the database is located. Additionally, if the path to the database is being referenced using UNC (\\Server\Share), ensure that the Share Permissions allow the IUSR_<machinename> account full access. This step applies even if the share is on the
local Web server.
If the page has been secured such that the IUSR_<machinename> can't access the file or database, then ensure that the user's account that is being authenticated has full control to the appropriate folders and files.
At a minimum, the account being used needs Create, Destroy, Read, Write to work with the .ldb file. Specific permission can be applied to the database to limit access.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.