Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB exe wont run on CD.

Status
Not open for further replies.

wendywam

Programmer
Jun 21, 2004
15
ZA
Hi
I have VB application and use Access 97 as my DB. The application works fine on my machine. I created a setup of it and ran the setup on another machine and it still works. Now I want the application to work on the CD as well. i.e Users must have a choice of running the application on CD or they can run a setup of it on their machines. The error message that I get when I run the app on CD is:
runtime error '-2147467259(80004005)'
Could not delete from specified files.
My app has to delete some records on the Database when it launches(start). I think some DLLs are missing.
What am I doing wrong. I connect like this to DB:
Set cnMvConnection = New ADODB.Connection
cnMvConnection.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strMvFilePathName & ";Persist Security Info=False")
strMvFilePathName is my Access database.

Please Help.
 
If the database is on a CD, obviously you can't delete records.
am I missing something ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Any data held on a CD is 'Read-Only', thus you cannot delete, add or change any records in the database, like it or not you need to have at least the database part of your program on the hard drive of the PC
 
Wendy

Further to comments on deleting from a read-only database on the CD, Access writes to hidden system tables. Just by opening up an Access database, you will generate errors because Access will not be able to update or edit the system tables.

Alternate choices...
- Best to use flash rom such as USB thumb drive. Will work on most Win 98, 2K and XP - fast and portable. But expensive. You can also use flash drives such as found on camera, PDA - compact flash, SD secure disk, etc.
- CD-rw, will work but read-write CD drives are very fickle - tend to be hardware specific - a CD-rw created on one CD-rw drive may not be read properly by another CD-rw drive.
- DVD-rw - I have not tired this, but suspect it may have a similar problem to CD-rw.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top