mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 17:06:14 +02:00
* mysql 4
This commit is contained in:
parent
6dc122aa62
commit
239beee554
@ -7,7 +7,7 @@ Interface
|
|||||||
|
|
||||||
Uses
|
Uses
|
||||||
{$ifndef ver1_0}
|
{$ifndef ver1_0}
|
||||||
mysql3,
|
mysql4,
|
||||||
{$else}
|
{$else}
|
||||||
mysql,
|
mysql,
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -69,7 +69,11 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Verbose(V_DEBUG,'Connection params : '+DatabaseName+' '+Host+' '+User+' '+Password);
|
Verbose(V_DEBUG,'Connection params : '+DatabaseName+' '+Host+' '+User+' '+Password);
|
||||||
|
{$ifdef ver1_0}
|
||||||
Result:=mysql_connect(@Connection,PChar(Host),PChar(User),PChar(Password))<>Nil;
|
Result:=mysql_connect(@Connection,PChar(Host),PChar(User),PChar(Password))<>Nil;
|
||||||
|
{$else}
|
||||||
|
Result:=mysql_real_connect(@Connection,PChar(Host),PChar(User),PChar(Password),Nil,0,Nil,0)<>Nil;
|
||||||
|
{$endif}
|
||||||
If Not Result then
|
If Not Result then
|
||||||
begin
|
begin
|
||||||
S:=Strpas(mysql_error(@connection));
|
S:=Strpas(mysql_error(@connection));
|
||||||
|
Loading…
Reference in New Issue
Block a user