<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloConnection > TApolloConnection Properties > DatabaseName |
Declaration
DatabaseName: String
Description
Run-time. The name of the active database name alias. This is mainly used by internal processes and would not normally need to be referenced in your own project code. One exception to this is when calling the GetTableNames method. Generally, all database selections are made at the data set level (TApolloTable and TApolloQuery).
Delphi Example
// Fills a combo box with table names from SAMPLEDATA alias
procedure TForm1.GetDatabaseNames;
var
msPtr: Pointer;
begin
cmbTableList.Clear;
if ApolloConnection1.Connected then
begin
// Select the database name to look for table in
ApolloConnection1.DataBaseName := 'SAMPLEDATA';
msPtr := dmApolloData.ApolloConnection1.GetTableNames;
if ( msPtr <> nil ) then
cmbTableList.Items.LoadFromStream( TMemoryStream( msPtr ));
end;
end;