Solved

How to currupt Access Database???

Posted on 2001-08-03
14
315 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA to format 3 80
Problem to delete range 4 55
VBA: Add rows to listbox based on criteria 7 64
How to debug this code 7 50
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

18 Experts available now in Live!

Get 1:1 Help Now