Page 1 of 1

Connection without server and port?

Posted: Fri 01 Jul 2005 09:22
by Nuno Mendes
MyConnection.Server := '';
MyConnection.Port := 0;
MyConnection.Database := database;
MyConnection.Username := username;
MyConnection.Password := password;
MyConnection.Connected := true;

if I use the code above the connection attempt is sucessfull on a localhost. Is this the way it should be?

Posted: Fri 01 Jul 2005 14:20
by Ikar
Yes, if server and port aren't specified a connection will be established with localhost:3306

Posted: Fri 01 Jul 2005 15:29
by Nuno Mendes
ok Thx!