Solved

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

Posted on 2004-04-02
2
144 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
[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 Comments
 
LVL 6

Accepted Solution

by:
Amir Azhdari earned 125 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 78
Firemonkey webbrowser scrollbars ? 1 57
How to load 2 images in same column in Delphi 2 67
Firemonkey how to swip panel with finger tap 1 18
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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