Archive CD

KenHigg

Registered User
Local time
Today, 00:48
Joined
Jun 9, 2004
Messages
13,327
I need to put some archive data on a cd. Then, when a user puts the cd in their computer, somehow have the archive data automatically launches and the user can look through the data. Maybe have the cd autorun Access and open the db on the cd. But the .mdb would be read only, so it will not open off the cd, will it?

Any ideas?

Ken
 
I have put a whole archive MDB on a CD. I put the archive application and the data on the same CD (in the same DB) and it ran fine, it was just read only. Don't think we did any thing special to it.
 
Hum... You don't have the code handy for the autorun do you? And what exactly do you name it on the cd? Would I need the full path for the access exe in the autorun file?

Thanks,
Ken
 
Crap! I can't find the stupid code.
But looking at an Autorun it appears simple.
Code:
[Autorun]
open=start.exe
icon=qsicon.ico

The qsicon.ico and start.exe were in the root directory on the CD along with the autorun.inf file (which contained the above code).
I think we just created a .BAT file that started access and pointed to the local copy of the MDB. I don't think it was fool proof, but if I remember (been a couple years) you have be carefull not to point to a drive mapping for the CD since it different is on every PC. I can't remember if we could execute MSACCESS.EXE directly or we pointed it to the C: drive with the common path.
 
The name of the AutoRun file is always autorun.inf

The data within the AutoRun file would look like something this...

Code:
[autorun]
open = C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE YourDatabase.mdb
You can edit the AutoRun file with any text editor.

You can not launch the database file directly, you have to tell it where the MSACCESS.EXE is located.

No matter what you do with the db on the CD... The db will always be opened in the "Read Only" state because the db can not create [open] the record locking .ldb file on a CD.
 
Cool. Do you know if there's a way to suppress the read-only message?

Ken
 
I have never come upon a way to disable the read-only message. It comes from Access so anything should be possible. Although it is a good warning to the user that they can not change anything. You could create your own custom message to give a better description to the user but that would mean two messages for the user. I imagine that you could test if the file attribute on the CD is read-only [it always will be] in an on open event of your db and give the user a good reason for the error and any limitation warnings you want. Search the forum for I have posted before on using the Attributes Property and the SetAttr Statement.
 

Users who are viewing this thread

Back
Top Bottom