*** apq-mysql-client.adb 7 Dec 2003 21:50:43 -0000 1.34 --- apq-mysql-client.adb 9 Jul 2004 03:47:12 -0000 1.35 *************** *** 1,4 **** ! -- $Id: apq-mysql-client.adb,v 1.32 2003/09/20 21:19:15 wwg Exp $ -- Copyright (c) 2003, Warren W. Gay VE3WWG -- -- Licensed under the ACL (Ada Community License) --- 1,4 ---- ! -- $Id: apq-mysql-client.adb,v 1.35 2004/07/09 03:47:12 wwg Exp $ -- Copyright (c) 2003, Warren W. Gay VE3WWG -- -- Licensed under the ACL (Ada Community License) *************** *** 451,456 **** --- 451,463 ---- C_String(C.Port_Name,C_Unix,A_Unix); end case; + -- + -- Must re-establish a C.Connection after a Disconnect/Reset (object reuse) + -- + if C.Connection = Null_Connection then + C.Connection := mysql_init; -- Needed after disconnects + end if; + C.Connected := mysql_connect( conn => C.Connection, -- Connection object host => A_Host, -- host or IP # *************** *** 613,618 **** --- 620,626 ---- begin if C.Connection /= Null_Connection then C.Connection := mysql_close(C.Connection); + C.Connection := Null_Connection; end if; C.Connected := False; end Disconnect;