|
|
|
|
![]() ![]() |
Apr 17 2006, 01:55 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: Members Posts: 31 Joined: 16-April 06 Member No.: 12,789 |
hi guys,
I am developing an application in Visual Basic 6.0 and using MS Access as my backend. What i want is that my database should not open when someone doublec clicks on the .mdb file. But my application should be able to access it. What can be a possible solution to this problem? Please help. Thanx in advance. |
|
|
|
Apr 17 2006, 03:42 PM
Post
#2
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 myCENTs:84.36 |
By default when you install MS-Office, the File Associations are set so that when you double-click on a .mdb file, MS-Access is launched and the file is opened up in it.
If you want your own program to open the .mdb instead, you've to reset the file association to and make the .mdb extension point to your own program. This can be done manually from Windows Explorer > Tools > Folder Options > File Types OR, you can write some extra code inside your program to programmatically reset the association. Here are a couple of articles that might help you get started with associating file types with your own code. 1. http://forums.devarticles.com/asp-developm...n-vb6t-189.html 2. http://www.codeguru.com/vb/gen/vb_system/d...icle.php/c4837/ Otherwise simple Google for "vb6 file type association" and you'll get plenty of hits.. Here's the link to the Search Results: http://www.google.com/search?sourceid=navc...ype+association All the best, m^e |
|
|
|
Jun 1 2006, 09:32 AM
Post
#3
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 5 Joined: 27-May 06 Member No.: 13,682 |
By default when you install MS-Office, the File Associations are set so that when you double-click on a .mdb file, MS-Access is launched and the file is opened up in it. If you want your own program to open the .mdb instead, you've to reset the file association to and make the .mdb extension point to your own program. This can be done manually from Windows Explorer > Tools > Folder Options > File Types OR, you can write some extra code inside your program to programmatically reset the association. I agree with this to an extent. The problem with doing the above is that all .mdb files will call your program if you set it up this way. I would suggest moving your .mdb to a hidden folder so that no one will be able to see it therein stoping anyone from opening it. |
|
|
|
Oct 13 2006, 02:09 PM
Post
#4
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 11 Joined: 13-October 06 Member No.: 16,536 |
I agree with this to an extent. The problem with doing the above is that all .mdb files will call your program if you set it up this way. I would suggest moving your .mdb to a hidden folder so that no one will be able to see it therein stoping anyone from opening it. Not exactly. Keeping a file hidden will make things more complicated as the user might want to move the program and, without notice, leaves the .mdb file behind. Besides, you need to manually make the file hidden or else you are breaching software trust laws. If you don't mind the .mdb file to be edited, keep it visible and include a readme file to tell the user to move along with the program. If not, do the same, but include these step: 1. Design or get the source code of an encrytion program and add that to your program. 2. Encrypt the .mdb file 3. Program the code so that you create a cache of the decrypted file. READ ON FIRST!!! 4. Add this code at the program's startup right after finishing the chache: CODE Dim FileNum As Integer 'Put this into the declararions section' FileNum= FreeFile Open 'Inset code here' For Input as #FileNum 5. Those who understand file acess will truly laugh at this. You keep the file used by the program and it can hardly be acessed except by some proffesional programmer. 6. Just before you close the program, add CODE Close #FileNum or else you will need to restart the computer before being able to reuse the application again.Alternatively: 1. Use Microsoft Acess to lock the .mdb file with a password. In Tools > Options menu. It's not hard to find from there. 2. In the VB development, right click on the tool bar and select Components... and search for Microsoft ADO Data Control. Use it in replacement of the default Data Control. It's a but different but the basics is still the same. Experiment with it for a while. Adapt the program to the control. 3. Just before acessing the file add: CODE Adodc1.password = 'password to the code. Note: replace the name of the component as necessary.This method is simpler but causes some campatability issues. I will only reccomend this to people with experience in the field of compatibility (or you could take the fun out by including the .dll file of the ADO component into the same directory as the program) |
|
|
|
May 29 2007, 08:20 AM
Post
#5
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 29-May 07 Member No.: 22,239 |
hi guys, I am developing an application in Visual Basic 6.0 and using MS Access as my backend. What i want is that my database should not open when someone doublec clicks on the .mdb file. But my application should be able to access it. What can be a possible solution to this problem? Please help. Thanx in advance. |
|
|
|
May 29 2007, 08:23 AM
Post
#6
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 29-May 07 Member No.: 22,239 |
Hi,
An easy way is to rename your access xxxxx.dbn to something like xxxxx.dbz. In your vb app change your filename accordingly. Regards Christo |
|
|
|
Jun 25 2007, 01:05 AM
Post
#7
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 10 Joined: 25-June 07 Member No.: 22,900 |
i'd date to be repetitive, but the previous user is 100 percent correct and I just wanted to elaborate on his posting. The file extension on a file has no impact on the data within it. As long as the file's data structure doesn't change, you'll be able to read and right to the file just like a normal database and your end user won't be able to harm it. And, if you find the need to edit the database live, you can always change back the file extension and open it with Access.
|
|
|
|
May 9 2008, 11:19 AM
Post
#8
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
want to use a sinlge user MS Access , VB6 application on network but the speed should be excellent
VB6-MS Access Question I want to use my VB6 and MS Access Project on the network for multi use on 4-5 machnies currently I am using the map drive and shring feature through visual basi but the speed is remarkably slow on the client nodes. What should I do to enhance the speed of data transaction and to maintain the locking so that more than one user can work on the application simultaneously on the same module/ same input window... -reply by Shiv |
|
|
|
Aug 23 2008, 09:36 AM
Post
#9
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
Retrive data from vb6 to Ms Access is really to slow
VB6-MS Access Question Hi guys, I got the problem with VB6 which is too slow to retrieve 1086 recordsets from Ms Access. It took about 3 to 5 minutes to show those data on the form. All you guy have any idea on this? Or any new techncal methods for this? Many thanks -reply by Jawa James |
|
|
|
Sep 3 2008, 11:10 AM
Post
#10
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
Please, how do I link vb to access?
After filling a form in vb, how di I link the submit button of vb to access table. Also, how will I access the store values in access. Please, help me with the procedure and the code. Thank you -reply by ibilola |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 2nd December 2008 - 01:28 AM |