procedure TPDO.disconnect;
This method closes a connection. If the connection is already closed, it doesn't do anything. The TPDO will call this method before its destruction, so it's not necessary to explicitly call in that case.
procedure dbtest;
var
db: TPDO;
begin
db := TPDO.create;
if (db.connect('mysql-4.0','10.0.0.152:3306','electronic_catalog','testuser','testpasswd')) then
writeln ('connection succeeded.')
else
writeln ('connection failed.');
db.disconnect;
db.free;
end;