Solved

delphi 8 listbox-populating

Posted on 2004-10-19
6
211 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
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
mnasman earned 500 total points
Comment Utility
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
Comment Utility
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:mnasman
Comment Utility
points to me
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

11 Experts available now in Live!

Get 1:1 Help Now