mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 17:59:27 +02:00
* Added possibility to specify port
git-svn-id: trunk@7056 -
This commit is contained in:
parent
77cd61b4d2
commit
38f8edae01
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user