Solved

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

Posted on 2004-04-02
2
145 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…

752 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