瀏覽代碼

fixed GetClientInfo for dynamically linked client

joost 20 年之前
父節點
當前提交
4e1b076d8f
共有 1 個文件被更改,包括 10 次插入3 次删除
  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;