Connection without server and port?

Connection without server and port?

Postby Nuno Mendes » Fri 01 Jul 2005 09:22

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?
Nuno Mendes
 

Postby Ikar » Fri 01 Jul 2005 14:20

Yes, if server and port aren't specified a connection will be established with localhost:3306
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby Nuno Mendes » Fri 01 Jul 2005 15:29

ok Thx!
Nuno Mendes
 


Return to MySQL Data Access Components