Solved

delphi 8 listbox-populating

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

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 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

25 Experts available now in Live!

Get 1:1 Help Now