Solved

How to currupt Access Database???

Posted on 2001-08-03
14
317 Views
Last Modified: 2012-06-21
Hello All Experts,

I've to currupt Access Database so that no one can open it through MS-ACCESS but again I should be able to aceess the same Database using VB.

Ravikant
0
Comment
Question by:ravininave
14 Comments
 
LVL 3

Expert Comment

by:Joebob
ID: 6349118
If you corrupt the db, it is corrupt to everyone, including VB.  Your only real option is to password protect the db with some long and weird password that your VB app knows, but nobody else will guess.
0
 
LVL 15

Expert Comment

by:mohan_sekar
ID: 6349125
Hi,

      I am not clear about your question. Do u wanna password protect your database or encrypt the data?

bye

Mohan
0
 

Author Comment

by:ravininave
ID: 6349140
No I don't wish to protect my db with password or I don't mean to currupt it.  I only wish that someone should not open it through Access.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 5

Expert Comment

by:dredge
ID: 6349172
rename it do databasename.DLL instead of databasename.MDB

you'll still be able to open it, but only if you actually know that it's a database instead of a .dll file.

the better way, of course, is to set a password.
0
 

Author Comment

by:ravininave
ID: 6349187
No I think there is a some way over there.  Because I'd downloaded one Software from NET.  When I tried to open Access Database then It gives me a message that the db is currupted.  But it uses it in his application.  How I don't know.
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 6349194
How about this as a possibility, use file functions to open the mdb for binary access, grab say the first 20 characters and store these somewhere like the registry. Rewrite these characters with garbage. Access will then spit out the mdb if you attempt to open it as the header will be corrupt. When you run your application, simply rewrite the original section from the registry and use your application as normal. When the application terminates, write garbage back to the header. It won't prevent access opening the mdb whilst your application has it open (unless your app uses it exclusively) but it will prevent casual attempts to open it with access.
0
 

Author Comment

by:ravininave
ID: 6349211
Please tell me in details.  As it seems to be a correct way.
0
 
LVL 4

Expert Comment

by:wileecoy
ID: 6349229
Actually, don't know if my $0.02 will make a difference, but I have found that the easiest thing is to follow dredge and just rename the extension.

However, I rename the extension to my initials so that I can easily track all such files.

The structure of the file is still the same, however, Windows and Windows apps (like Access) won't recognize it by it's structure, only by it's extension.

hth.
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6349260
>No I think there is a some way over there.  Because I'd
>downloaded one Software from NET.  When I tried
>to open Access Database then It gives me a message that
>the db is currupted.  But it uses it in his application.
>How I don't know.

Did it say it was corrupt? Or did it say it was an unrecognized database format? That program you downloaded may be using a higher version of the Access database than your copy of Access. For example, you cannot open an Access 2000 database by using MS Access '97. Or, the program may be using a different type of database altogether.




Your objective is to prevent people from opening the database in Access, yet for the database to be still usable by your program.

Your best method of achieving this goal is not to corrupt your database, but rather to either use a database password, or to use user-level security and secure your database.



Adding a password to the database is a very simple solution, and your VB program can simply access the database with the password; and your end-users of your VB program would never even know about the password. It would function exactly as if there were no password on the database because your VB program takes care of it automatically in the programming. Yet, if a user attempts to open the database in Access, they will be prompted for a password and they cannot open it unless they know what that password is.

The downside to using the database password is that it is very easy to break. There are probably about 20 people here who can quite readily explain to you how to do this.



A better approach would be to secure your database, change ownership of all objects to a special user you create, revoke all rights from the Users Group, Admins Group, and the Admin User, and add a password to the Admin User. Give all rights to your special user. Then your VB program would simply open your database under your special user's identity; and again, your users would never know the difference, and they also would not be able to open it in MS Access.


-Dennis Borg
0
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6349688
Hi, I like the changing of the header approach, but another possibility is to encrypt the entire database file using some encryption algorithm. This is functionally the same as changing the header, but it is a bit more secure, although the time required might be a bit excessive.

Zaphod.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6349835
The error message that you are getting may indicate that the MDB you are attempting to open is really Access 2000, and you are trying to open it with Access 97.

 
0
 

Author Comment

by:ravininave
ID: 6351216
Hi TimCottee,
I thins yr way is correct.  I'm trying with this.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7198468
Hi ravininave,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept TimCottee's comment(s) as an answer.

ravininave, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7213233
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

773 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