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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the .mdb extsion to another

Status
Not open for further replies.

sjn78

Programmer
Feb 22, 2003
92
0
0
AU
I have seen this done but I am a little unsure on how to perfrom this.

I want to change the .mdb extesion of a database to something like this .cmr

Is there a way to tell vb to open the .cmr file as a .mdb file and use it as your typical database.

The reason behind this, is to try and stop people who have ms access from being able to go into it and maybe changing something.

I know some people will figure it out and can just change the extension, but it may slow them down.

Thanks for any help

Steve
 
A simple way is to rename the file from .cmr to .mdb before opening the database and change back to .cmr after having done with the .mdb file.
 
Hey Steve, why dont you give a password in your Access File, in this way, people who dont know the password, cant open the file..and cant change it..simple.....
Or is there some other problems...

email me at gold752001@rediffmail.com...if you have some other problems...
 
Thanks ITProgrammer,

I though about that, but am unsure how vb reacts to a database with a password as I have never tried it.

Do you just supply the password in the connection string when accessing it from vb?

Thanks for your help

Steve
 
Use JRo to add a password, and compact the db at the same time. You can do this also with MS Access.

Ado and Dao have no problems with this.
Once set, you just supply the password in the connection string (plenty of examples here).

The simple database password can be easily cracked with an editor, but should keep most normal users out.
You can get pretty good security using the Work group administrator (takes a real expert to crack a password set here an obtain access to the db - if done right, which in most cases is never done right.) and encrypt the db (slows things down a little).

 
If you're using DAO, just rename the database's extension; DAO doesn't care what you call the database.

Be careful to choose an extension that isn't already registered with another application -- a user may double-click on its icon and open it in Photoshop or something, and totally trash the file.
 
Thanks for everyones help. I will give each go a try.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top