Link to home
Start Free TrialLog in
Avatar of DOOM_DAEMON
DOOM_DAEMON

asked on

Retrieving MDB Table, Field Description, How? Not Table Name, Field Name. Help me out, please...

       I've post this message once but it seemed to me none of real experts out there can neither figure it out nor interested in my point So I decided to repost it again with more point back...only if it's done. Here' s my question.
        I've been wondering how to retrieve Description of MDB Database table and its correspodging
fields Description...Please make sure you understand me before have your comment posted. I mean Table Description, Field Description. A Description you added when you Create Table and it's field. **** Not A Table Name, or Field Name***** Just it's description...
        For example, I created database, say mdb database, using Microsoft Access. I then created Table
name "FirstTable" and put right click on it and type in "This is my first Table " as it's description.
As you can see, it's description can be viewed in Detail Mode to see what description it has. I then
create fields, just 2 fields named "fldFirst" as Text field and Type in "This is First Field" as it's
description...The same way I did to second field named "fldSecond" with corresponding Description "This
is Second Field". Finally I saved it.
        By now, I need fully coded written in Delphi to retrieve Table Description, and First, Second
Field Descripion. Please explain me in detail if it needed.
        Just real programmer out there can do it, I know...Do me a favor, I'll give you back some point...please.  
Question History
Avatar of Jacco
Jacco
Flag of Netherlands image

I think the only way is interpreting the MDB file. (I have view the MDB with notepad and can see that the descriptions are in there).

I have tried the following:

ADO: does not have an interface to the descriptions
DAO: does not have an interface to the descriptions
Access objects: do not have an interface for it either

So I think the only program that will get the description from the file is MS Access itself. Maybe they don't want anybody writing a better interface for MDB files....

Regards and good luck Jacco
Well I figured if there was an interface availble for this it would be in VB since Access is VB's native database. No such luck though. There does not appear to be any direct way to retrieve this info. Weird to say the least but MS does have a habit of not making certain things available to the developer.
ASKER CERTIFIED SOLUTION
Avatar of Shagrouni
Shagrouni

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I saw those properties but didn't get them to work!

Good work shagrouni
Avatar of DOOM_DAEMON
DOOM_DAEMON

ASKER

  I don't try your code posted here yet. Anyway, anyone tried it should tell me how well it work with Delphi. I don't agree with you, Jacco. Cause I think, personally, MDB has been widely used throughout this world. One thing they must provide is a compatible between programming platform. Not just for Microsoft....
   So if it work, please ya all do me a favor inform me if previous code work or not...So I'll give Shangrouni some points for his mercy on me....
It works. I have tried with Delphi 5 (you have to have MS Access or DAO components installed). I didn't know MDB files were supported onm other platforms than MS.

Regards Jacco
Hi Jacco as far as I know Access main target is Windows and I believe there is a version for Apple, definitely no versions of it are made for UNIX or Linux or BeOS, etc. Of course 32 bit versions of it will not run on Win 3.1. MS will be discontinuing support for Win95 by the end of this year so any upcoming versions of Access may not work on Win95 anymore and by mid 2003 the same will hold true for Win98 because that is the target date MS has set for discontinuing support for that OS. So in two years any software produced by MS will only be targeted for the NT OS's and ME.

Actually I think what DOOM_DAEMON was referring to was compatibility between programming languages and not OS's, which I would disagree with. MS is not under any legal obligation to make Access compatible with any language if they don't want to. It is their product and they have the same legal rights as any other developer to make their product compatible with whatever they choose to. :>)
>>So in two years any software produced by MS will only be targeted for the NT OS's and ME.

interesting..maybe a good thing too,can be annoying coding for different platforms worrying about which one supports what.

DOOM_DAEMON ,
Shagrouni's code works pretty good,i like the all available properties part could be useful.
Finally, I've tried it myself and ofcourse, as you all experts can see, it works...So thanks to ya Shagrouni'...Here I give you expertise points...You know what, You deserve it...Thank you again.
You help me out...Here come what you deserve as a real experts...guy