Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
Connecting to Databases
Previous  Top  Next

Connecting to a database

You can connect to a database file by the following steps:
1.Set the TABSDatabase.MultiUser property to True, if multi-user database access is expected or set the MultiUser property to False, if database access is known to be a single-user one.  
2.Call the TABSDatabase.Open method or set the TABSDatabase.Connected property to True.  

Setting Connected to True executes the Open method. Open verifies that the database specified by the TABSDatabase.DatabaseFileName exists and opens the database file.

Disconnecting from a database

There are two ways to disconnect open database from a database component:

1.Set the TABSDatabase.Connected property to False.  
2.Call the TABSDatabase.Close method.  

Setting Connected to False calls Close. Close closes all open datasets and database file. For example, the following code closes all active datasets and database file for a database component :
ABSDatabase1.Connected := False;

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Jun 16, 2024