Solved

delphi 8 listbox-populating

Posted on 2004-10-19
6
215 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
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.

734 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