Solved

Menus at runtime

Posted on 2001-06-11
2
204 Views
Last Modified: 2010-05-02
Objective:
My app can have multiple dsn's which I store in an Oracle table. I want to have a menu (Databases)that when clicked it looks something like this:
   DATABASES
      (DSN NAME) -> tables -> (list tables for that DSN)
                             -> stored procedures -> (list sp's)

      (DSN NAME) -> tables -> (list tables for that DSN)
                             -> stored procedures -> (list sp's)

can anyone give me an example in code (not using API's) on how to do this at runtime based on the DSN's I have listed in my table?

Environ: VB6 (sp5) , NT4 WKST, ADO 2.6

Thanks.
0
Comment
Question by:stacey14
2 Comments
 
LVL 5

Expert Comment

by:AndrewDev
ID: 6176988
These links should help. Having got your DSN list it will depend what your database is I have provided some examples of different types of database access.


List All Installed System DSNs
http://www.freevbcode.com/ShowCode.Asp?ID=302

Access Database Front End
http://www.freevbcode.com/ShowCode.Asp?ID=978

Access Database Viewer and Tools, Including Excel Exporter
http://www.freevbcode.com/ShowCode.Asp?ID=2182

SQL Server Database Explorer
http://www.freevbcode.com/ShowCode.Asp?ID=1761

Hope this helps
Regards
Andrew
0
 
LVL 7

Accepted Solution

by:
Z_Beeblebrox earned 75 total points
ID: 6177025
To do dynamic menus, use menu arrays. Create one base menu item with index 0. Then do load basemenuname(1) to create a new menu. You can then set the attributes of this menu item. Load addiitonal menu items as needed.

Zaphod.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

807 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