* Added possibility to specify port

git-svn-id: trunk@7056 -
This commit is contained in:
michael 2007-04-03 07:59:43 +00:00
parent 77cd61b4d2
commit 38f8edae01

View File

@ -216,9 +216,13 @@ end;
procedure TConnectionName.ConnectMySQL(var HMySQL : PMySQL;H,U,P : pchar);
Var
Port : Cardinal;
begin
HMySQL := mysql_init(HMySQL);
HMySQL:=mysql_real_connect(HMySQL,PChar(H),PChar(U),Pchar(P),Nil,0,Nil,0);
Port:=Abs(StrToIntDef(Params.Values['Port'],0));
HMySQL:=mysql_real_connect(HMySQL,PChar(H),PChar(U),Pchar(P),Nil,Port,Nil,0);
If (HMySQL=Nil) then
MySQlError(Nil,SErrServerConnectFailed,Self);
end;