Przeglądaj źródła

fixed GetClientInfo for dynamically linked client

joost 20 lat temu
rodzic
commit
4e1b076d8f
1 zmienionych plików z 10 dodań i 3 usunięć
  1. 10 3
      fcl/db/sqldb/mysql/mysql4conn.pas

+ 10 - 3
fcl/db/sqldb/mysql/mysql4conn.pas

@@ -127,10 +127,17 @@ end;
 
 
 function TMySQLConnection.GetClientInfo: string;
+
 begin
-  CheckConnected;
-// Ask MvC
-  Result:=strpas(pchar(mysql_get_client_info));
+{$IfDef LinkDynamically}
+  // To make it possible to call this if there's no connection yet
+  InitialiseMysql4;
+{$EndIf}
+  Result:=strpas(mysql_get_client_info());
+{$IfDef LinkDynamically}
+  ReleaseMysql4;
+{$EndIf}
+
 end;
 
 function TMySQLConnection.GetServerStatus: String;