Requesting Database Information
From InterBase
Go Up to Requesting Information about an Attachment
This section gives an example of how to use the TIBDatabaseInfo component.
To set up a simple TIBDatabaseInfo component:
- Drop a
TIBDatabasecomponent and aTIBDatabaseInfocomponent on a Delphi form. - Using either the Object Inspector or the Database Component Editor, set up the database connection. For more information, see Connecting to a Database Server.
- Set the
TIBDatabaseInfocomponent’sDatabaseproperty to the name of theTIBDatabasecomponent. - Connect the
TIBDatabasecomponent to the database by setting theConnectedproperty to <True>. - Drop a
Buttoncomponent and aMemocomponent on the form. - Double-click the
Buttoncomponent to bring up the code editor, and set any of theTIBDatabaseInfoproperties described above. For example:
procedure TForm1.Button1Click(Sender: TObject); var I: Integer; begin with IBDatabaseInfo1 do begin for I := 0 to UserNames.Count - 1 do Memo1.Lines.Add(UserNames[i]); Memo1.Lines.Add(DBFileName); Memo1.Lines.Add(IntToStr(Fetches)); Memo1.Lines.Add(IntToStr(CurrentMemory)); end; end;