Solved

Access mdb file from cd?

Posted on 2004-10-23
304 Views
Last Modified: 2010-05-18
Hi
i want to connect to a mdb (microsoft Access database) from CD drive by ADO Connection.
but ADO create an exception(can not create lock file). i think that Access wants to create an temporary file (*.ldb) and because the main file (*.mdb) is on CD dirve it can not.
so how can i prevent ADO from creating this temp file (*.ldb) or change locatine to a place other than CD drive?
Thanks in advance
NIMA
0
Question by:Mohamadi
    6 Comments
     
    LVL 22

    Accepted Solution

    by:
    Hello

    Set the connection mode to ShareExclusive

    ADOConnection1.Mode := cmShareExclusive;

    Regards,
    Mohammed
    0
     
    LVL 7

    Assisted Solution

    by:DavidBirch2dotCom
    Hi I think the problem is that the file on the CD is read-only .'. you cannot write back to it, and neither can Access :( I would suggest copying it from the CD to a temp folder, set it so its not read only and then reading it (dont forget to delete it again when your finished) cheap nasty but it should work ;-p)
    0
     
    LVL 5

    Expert Comment

    by:Voodooman
    Hi

    Just a suggestion.

    Create a database locally on your C: drive and either link the tables on your CD or import the tables.

    Do a test by opening the mdb with MSAccess/ and /or linling the tables - this will give you some clues.


    Voodooman
    0
     
    LVL 7

    Expert Comment

    by:DavidBirch2dotCom
    good idea,

    if that works properly then the only differenace will be that thw file on CD is read-only ... so .'. try copying it off making it not real-only and then using it

    David
    0
     
    LVL 7

    Expert Comment

    by:DavidBirch2dotCom
    I feel that I aught to get some points here, the file was almost certainly read only and so could not be accessed normaly

    Regards

    David
    0
     
    LVL 22

    Expert Comment

    by:mnasman
    points to me
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Suggested Solutions

    Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    909 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now