Solved

delphi 8 listbox-populating

Posted on 2004-10-19
6
216 Views
Last Modified: 2010-04-05
I am using delphi 8 in a databse application.Using winforms.How do I retrieve the database name and tablenames to display in list box's?????
0
Comment
Question by:ColinAlchin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 500 total points
ID: 12355628
Hello

  Start new VCL .Net application, drop Session component from BDE, and two listboxes and one button

ListBox1 will show all the aliases, when you click on anyone like DBDEMOS it will show you the tables on the ListBox2

procedure TForm1.Button1Click(Sender: TObject);
begin
  Session1.GetDatabaseNames(ListBox1.Items);
end;

procedure TForm1.ListBox1Click(Sender: TObject);
begin
  ShowMessage(ListBox1.Items[ListBox1.ItemIndex]);
  Session1.GetTableNames(ListBox1.Items[ListBox1.ItemIndex],'*.*',True,True,ListBox2.Items);
end;

HTH

Regards,
Mohammed
0
 

Expert Comment

by:krypto2000
ID: 12398031
I think the problem is not the code because I've copied exactly the same in my application and it work fine !!

Check your connections strings...
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 13356446
points to me
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month7 days, 17 hours left to enroll

617 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