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
TIBDatabase
component and aTIBDatabaseInfo
component 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
TIBDatabaseInfo
component’sDatabase
property to the name of theTIBDatabase
component. - Connect the
TIBDatabase
component to the database by setting theConnected
property to <True>. - Drop a
Button
component and aMemo
component on the form. - Double-click the
Button
component to bring up the code editor, and set any of theTIBDatabaseInfo
properties 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;