"Jim Bunton" wrote in message
> I have an Access 2000 database.
> I am connecting to it via web page through an aodb connection
>
> ****code snipped****
> dim Cn
> Set Cn=Server.CreateObject("ADODB.Connection")
> Cn.Provider = "Microsoft.Jet.OLEDB.4.0"
> Cn.Properties("Data Source") = "e:\. . . \Test.mdb"
> Cn.Properties("User ID") = "Admin"
> Cn.Properties("Password") = ""
> Cn.open
> set OpenConnToGoodsInStock = Cn
> ****end code snippet
>
> This works fine on my original running on win 2k whilst I have the
database
> open for development purposes at the same time as the web browser access
is
> being made.
>
> I have ported the application to a windows Xp machine.
> On the Xp installation if the database is open then access via the aodb
> connection in the web application give the error
>
> Error Type:
> Microsoft JET Database Engine (0x80004005)
> Could not use ''; file already in use.
>
> [Note: I CAN run two simultaneous versions the web page application
without
> the file already in use error]
> ---------------------------------------
>
> I have checked that the database on the NEW installation is set to open in
> SHARED mode.
>
>
> ?? What's causing the sharing restriction on the Xp installation??
>
> ----------------------------------------
> Jim Bunton
>
There are a number of conditions that might cause this error - but in the
long run they all come down to the LDB file.
1) The web/user doesn't have full permissions to the folder where the MDB
file is located (in order to create a LDB file). The app/user has to have
full rights to the folder.
2) An old LDB file is still there, delete it.
3) Make sure no other app/process has opened the file or failed to close its
connection.
4) Often a 'test' or 'outside' app will make it appear that permissions are
set correctly when opening and closing a MDB file, because it will open it
for exclusive use (perhaps also read-only), and thus not create a LDB file.
Other Apps needing to 'share' the file will 'fail'. Make sure you can open
the file and 'share' it (create an LDB) when you "test".
Required reading when sharing mdb files...
http://support.microsoft.com/kb/176670
http://support.microsoft.com/kb/303528/
http://support.microsoft.com/kb/208778
hth
-ralph