Access mdb file from cd?

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
MohamadiAsked:
Who is Participating?
 
Mohammed NasmanConnect With a Mentor Software DeveloperCommented:
Hello

Set the connection mode to ShareExclusive

ADOConnection1.Mode := cmShareExclusive;

Regards,
Mohammed
0
 
DavidBirch2dotComConnect With a Mentor Commented:
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
 
VoodoomanCommented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
DavidBirch2dotComCommented:
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
 
DavidBirch2dotComCommented:
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
 
Mohammed NasmanSoftware DeveloperCommented:
points to me
0
All Courses

From novice to tech pro — start learning today.