Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can I know the name of a table inside an Access (MDB) or Excel (XLS) file?

Posted on 2004-04-02
2
Medium Priority
?
151 Views
Last Modified: 2010-04-05
Hi! I have an app which uses an adoDataSet to connect to an Excel or an Access file (choosen by user), but I wanna now if there's a way to retrieve the sheet's (XLS) name, or the table's name (MDB).
Tried to do it through property CommandText, making a reference to it as an array, but obviously, it was wrong.

I'll appreciate any help =)
Alex
0
Comment
Question by:atirado
2 Comments
 
LVL 6

Accepted Solution

by:
Amir Azhdari earned 500 total points
ID: 10748982
hi ,
if i don't misunderstood , you wanna get tables name in a MDB file if so , use an adoconnection , set the 'adoconnection.connectionstring' and set your adodataset's connection to the adoconnection , place a memo and then try this code :

adoconnection1.GetTableNames(memo1.Lines,False);

let me know if you have any prob.

Regards
Azhdari
0
 

Author Comment

by:atirado
ID: 10753556
Thanks a lot, Azhdari! It worked out just perfectly! =)

Greetings from MX (H)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

877 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