2010. május 19., szerda

Connect to server databases (InterBase) without the login dialog


Problem/Question/Abstract:

Connect to server databases (InterBase) without the login dialog

Answer:

To bypass the login dialog when connecting to a server database, use the property LoginPrompt.You will have to provide the username & password at runtime, but you also can set that up at design time in the object inspector, property Params.

This short source code shows how to do it:

Database1.LoginPrompt := false;
with Database1.Params do
begin
  Clear;
  // the parameters SYSDBA & masterkey should be
  // retrieved somewhat different :-)
  Add('USER NAME=SYSDBA');
  Add('PASSWORD=masterkey);
end;
Database1.Connected := tr

Nincsenek megjegyzések:

Megjegyzés küldése