Topic: mysql login error message
HELLO MVD
Is there any way to change error message while connecting to mysql database?
Thanks in advance.
My Visual Database → General → mysql login error message
HELLO MVD
Is there any way to change error message while connecting to mysql database?
Thanks in advance.
Hello.
You can change this message only if you connect to MySQL by script, example:
procedure Form1_OnShow (Sender: string; Action: string);
begin
Application.ProcessMessages;
{$MySQL disable_connectdialog}
Form1.MySQLConnection.Server := '127.0.0.1';
Form1.MySQLConnection.Port := 3306;
Form1.MySQLConnection.Username := 'root';
Form1.MySQLConnection.Password := 'password';
Form1.MySQLConnection.Database := 'databasename';
try
Form1.MySQLConnection.Connect;
except
if Pos('#28000', ExceptionMessage)>0 then
begin
MessageBox('Access denied', 'Error', MB_OK+MB_ICONWARNING); // your message
end;
Form1.Close;
end;
if Form1.MySQLConnection.Connected then
begin
UpdateDatabase(''); // to fill ComboBoxes
Form1.TableGrid1.dbUpdate; // if you have TableGrid on first form with option "Enable auto execution", you should call method dbUpdate manually
end;
end;
Also you can create own dialog for connection to MySQL.
Thank YOU sir. gREAT!
My Visual Database → General → mysql login error message
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi