Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Photo
- - - - -

VB6-MS Access Question


17 replies to this topic

#1 sandeep

sandeep

    Member [ Level 1 ]

  • Members
  • 31 posts

Posted 17 April 2006 - 01:55 PM

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.

#2 miCRoSCoPiC^eaRthLinG

miCRoSCoPiC^eaRthLinG

    PsYcheDeLiC dR3aMeR

  • [MODERATOR]
  • 2,248 posts
  • Gender:Male
  • Location:Bangkok, Thailand
  • Interests:Photography, Magic Tricks, Numismatics & Philately to some extent, Being a nuisance in general (that's my favourite)
  • myCENTs:NEGATIVE[-21.50]

Posted 17 April 2006 - 03:42 PM

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.devart...n-vb6t-189.html
2. http://www.codeguru....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.co...ype association


All the best,
m^e

#3 marsden

marsden

    Newbie [ Level 1 ]

  • Members
  • 5 posts

Posted 01 June 2006 - 09:32 AM

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.

#4 Lee-Programmer

Lee-Programmer

    Newbie [ Level 2 ]

  • Members
  • 11 posts

Posted 13 October 2006 - 02:09 PM

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:
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
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:
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) :P .

#5 Christo

Christo

    Newbie [ Level 1 ]

  • Members
  • 2 posts

Posted 29 May 2007 - 08:23 AM

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

#6 Feussy

Feussy

    Newbie [ Level 2 ]

  • Members
  • 10 posts

Posted 25 June 2007 - 01:05 AM

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.

#7 Guest_FeedBacker_*

Guest_FeedBacker_*
  • Guests

Posted 09 May 2008 - 11:19 AM

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

#8 Guest_iGuest-Jawa James_*

Guest_iGuest-Jawa James_*
  • Guests

Posted 23 August 2008 - 09:36 AM

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

#9 Guest_iGuest-ibilola_*

Guest_iGuest-ibilola_*
  • Guests

Posted 03 September 2008 - 11:10 AM

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

#10 Guest_(G)sabiha_*

Guest_(G)sabiha_*
  • Guests

Posted 08 September 2009 - 10:31 AM

visual basic 6.0VB6-MS Access Question

how do you search a particular table which is given by user as a string in visual basic 6.0 and he wants to search whether that particular string which is the table name in database is present or not what is the query that I can write plz help

its urgent thnx in advance 

-question by sabiha

#11 Guest_(G)janmark_*

Guest_(G)janmark_*
  • Guests

Posted 26 September 2009 - 09:58 AM

vb6 - accessVB6-MS Access Question

If you want to access the data of MS access using visual basic 6,, you have to follow the following steps:

step 1:

go to control panel click "performances and maintenance", then click "administrative tools", and double click "Data Sources (ODBC)". When you see a dialog, click "system dsn" and click "add" then double click "microsoft access driver (*.Mdb)". click "select", then find the  MS access database where you save. And click ok. in "data source name type" the filename of your Ms access data base ( for example db1) . Then click OK. Press enter.

step 2:

start an vb6  then select "standar EXE".  click "project", click "components". In control check the "microsoft ado data control 6.0 (OLEDB)" then click ok. Then click the data control in the tools and add it in your form1 "adodc1" right? 'you can see it in the last tools beside the OLE name adodc1'. Put it in the form1.

 

after that. Righ click adodc1, click "adodc property" select the  ADODC data source name and fill the file name of your MS access data base (for example "db1"). After that click "record source" then fill the "command text (SQL)" input this command "select * from table1",,, if the table name of your data base is table1. Then click ok.

step 3:

 make a text name text1 then click it. And fill the properties bellow

datasource = click the arrow bellow and select adodc1

datafield =  click the arrow bellow and select field ( for example "name")

 

step 4:

try to run your program.

 

this is very sensitive.. That's why I advice to use a filename of your database is "db1" and the table is "table1" so that you can follow all the instructions I've given.. That's it.

 if the data of your MS data base is in the text1.Text, it means you got it.. But if not.. Try to analize of your mistake.. This is very sensitive... Try to be positive and patient.. I hope this comment will lead you success..

 -reply by janmark



#12 Guest_(G)janmark_*

Guest_(G)janmark_*
  • Guests

Posted 26 September 2009 - 08:49 AM

Replying to iGuest-Jawa JamesVB6-MS Access Question

Replying to iGuest-Jawa JamesI think the memory of your computer is so small that's why it takesTime to access the data of your data base.. I suggest to uninstall the other programs in your computers so that it will run accurately..

-reply by janmark

 



#13 Guest_(G)rick_*

Guest_(G)rick_*
  • Guests

Posted 03 November 2009 - 09:11 PM

opening a database in vbaVB6-MS Access Question

We have just converted over to office 2007.  In my databases I have one database calling another, before the conversion it opened fine, now it just opens and then closes.   the code I used is

dim strdb as string

strdb = "flie name and path"

set appAccess = CreateObject("Access.Application")

With appAccess

.OpenCurrentDatabase strdb

. Visible = True

.RunCommand acCmdAppMaximize

end with

can anybody help me with this

 

 

-question by rick

 



#14 Guest_(G)ahid zameel_*

Guest_(G)ahid zameel_*
  • Guests

Posted 21 November 2009 - 05:48 PM

calling ms acccess switchboard by vb6 but the report of the switchboard is not openingVB6-MS Access Question

I make a ms access database with switchboard. I used vb code to call the switchboard of msaccess. The forms of the switchboard are working fine when I click but the reports are not opening. When I click the report from the switchboard, it looks like opening but it doesn't pop up. From ms access report properties, I make pop up and madal to yes but still not working.Is there any one who can help me with this? your help will be much appreciated.

-reply by ahid zameel



#15 Guest_(G)Dev_*

Guest_(G)Dev_*
  • Guests

Posted 13 February 2010 - 09:20 AM

Unrecognized databaseVB6-MS Access Question

I have install the VB 6.0 Professional and MSDN 2000 Library on the system.

 I have MS office 2000. I make database in ms Access and access the table data in visual basic by drag & drop the data control.

 After that I set the property of data control like this

 Database name : give path of database where I stored.

When I set the Property of Recordsource it display the message "unrecognized format of the database store in "path where I store database (like db1)" .

 Pl. Help me what should I do when such type of message display on screen.



#16 Guest_(G)Vikram_*

Guest_(G)Vikram_*
  • Guests

Posted 08 February 2010 - 09:19 AM

Retrieve tree View database structure from MS-Access using VB6VB6-MS Access Question

Hi,

I am facing problem in Vb6 that how can I retrieve a tree structure data from MS Access.

My table def. Is as follow:

    CurrentID         Description       PrvID

  1                         Node1 0

      2                       Node2 1

      3                         Node3               2

      4                       Node4               2

      5                   Node5   2

      6                         Node6             3

    7                       Node7           3

      8                       Node8           1

Now the question is this that:

1)   How can we retrieve the entire structure in tree view form in a list box

2)   suppose we want to retrieve then tree structure of a particular node Like Node2.How?

3) I have some idea that this problem can be solve through recursion method.

Solve this problem and mail me.

Thanks in advance.

   

-question by VikramKeywords:

#17 Guest_(G)jashi_*

Guest_(G)jashi_*
  • Guests

Posted 03 April 2010 - 03:37 PM

I am developing an application in Visual Basic 6.0 and using MS AccessAs my backend.

but project code is error,,how can I solve this problem,,,,problem have error occured,,

please help,,,

-reply by jashi

#18 Guest_(G)rammohan_*

Guest_(G)rammohan_*
  • Guests

Posted 20 July 2010 - 04:27 AM

code for search button with back end was ms- access,with adodcVB6-MS Access Question

I develop a product it was belong to employee details using adodc connector with access as a backend.Now I want a code such as if we enter the employee id we got the total information about him using search button. So please tell me the code.

-reply by rammohan

 





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users