Solved

Menus at runtime

Posted on 2001-06-11
2
201 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 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…

930 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

14 Experts available now in Live!

Get 1:1 Help Now