Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Locked Db

 
   Database Help (Home) -> Visual Basic -> ODBC RSS
Next:  Will pay for need help and occasional advise on u..  
Author Message
Jim Bunton

External


Since: Oct 04, 2004
Posts: 14



(Msg. 1) Posted: Thu Feb 22, 2007 1:54 pm
Post subject: Locked Db
Archived from groups: microsoft>public>vb>database>odbc (more info?)

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

 >> Stay informed about: Locked Db 
Back to top
Login to vote
Ralph

External


Since: Jan 28, 2008
Posts: 34



(Msg. 2) Posted: Fri Feb 23, 2007 6:25 am
Post subject: Re: Locked Db [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"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

 >> Stay informed about: Locked Db 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
HOWTO: Clone SQL db ? - Hi all, I'm having a SQL Server database called X. For testing and training, I would like to make a copy of the entire DB to Y. This copy should include all data, properties, indexes, views, etc. Unfortunately, all my attempts to automate this..

Change connect string for Excel Queries using an ODBC Driver - Reference: ODBC Connection for MAS90 MAS200 In Excel we have an ODBC Connection String with a physical (hard coded) path to the data. We have changed the servers. We do not want to recreate all of the queries. How can we edit the ODBC path inside of..

ISA 2006 with My sql Connection - Hi, Please help me,acutually I am facing problem with ISA 2006.It does not connect Mysql data base. It is giving error"Can't connect to Mysql server on "IP" 10060."

Compile Error - Can anyone please help me to solve this problem I have when I tried to compile and run my program written in VB 6.0? Problem: I used variable declaration such as db as Database and ws as Workspace. I use ODBC way to connect my VB form interface with....

ISAM driver query - Hi, I am developer in Visual Basic 6.0 and SP4 application development and database use MS Access XP and SQL 7.0. This field last 6years and I am use Clipper 5.3, 5.2(Compiler) and Foxpro 2.6, Dbase IV(Database). At now I am totaly convert in VB so I am...
   Database Help (Home) -> Visual Basic -> ODBC All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]