An example how to use the TIBDatabaseInfo but of course you have to read UserNames property (TStringList)
to retrieve the dialect of the database you need to use the TIBDatabaseInfo component. This component has a property, DBSQLDialect, that you can access to retrieve the connected database's dialect. Here is a code example that retrieves the connects to a database and retrieves its dialect for display.
// set database to connect to
ibdatabase1.DatabaseName := 'employee.gdb';
// connect to database
ibdatabase1.Connected := true;
// retrieve database dialect and display in edit box
Edit1.Text := IntToStr(ibdatabaseinfo1.DBSQLDialect);