TDatabase Connection

Hi Friends,
I want to know how to connect a MS Access Database
to a C++ Builder application.
I try to use TDatabase Component to do this.
I have a Access database named WaferMapping.mdb which
has a table name tblWaferDetails.
I am much confused about DatabaseName,AliasName of TDatabase.

Please anyone tell me how to connect to a Database,
add and retrieve records to the table in the Database.
If anyone can give code,most appreciated.

Thanks for yor replies.

Comments

  • : Hi Friends,
    : I want to know how to connect a MS Access Database
    : to a C++ Builder application.
    : I try to use TDatabase Component to do this.
    : I have a Access database named WaferMapping.mdb which
    : has a table name tblWaferDetails.
    : I am much confused about DatabaseName,AliasName of TDatabase.
    :
    : Please anyone tell me how to connect to a Database,
    : add and retrieve records to the table in the Database.
    : If anyone can give code,most appreciated.
    :
    : Thanks for yor replies.
    :
    :

    Hi dubi,
    to connect to a Ms Access database - first you have to create an alias - open Control Panel -> BDE Administrator, select on Ms Accsess Database and fill in the table - Database Name (path to your database), langdriver Access General. Then open Administrative tools -> Data Sources (ODBC) and double click on Ms Access Database, and Select ... locate your database.
    Then from your Builer C++ go to Tools->Database desktop and Tools->Alias Manager you should see under Ms Access your database alias. Try Connect - if everything is OK the message should come up that your database is connected. In this case if you click on the table icon you should see your tblWaferDetails - it should open in the database desktop. Good Luck. Do not get frustrated if you do not get it the first time - it works.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion