C ++ MySQL连接器:如何使用或模拟mysql_ping()

时间:2015-12-03 12:09:25

标签: c++ mysql

我正在使用MySql C ++ Connector驱动程序,并且它没有mysql_ping()函数(至少来自this official link here

至于给定的链接,类似上面的代码会起作用:

if (connection->isClosed())
    connection->reconnect();

问题是reconnect也不存在。我的代码无法使用此错误进行编译:

class sql::Connection has no member named ‘reconnect’

PS:驱动程序类SqlDriver*也没有重新连接。

如何使用C ++连接器调用或模拟mysql_ping()

0 个答案:

没有答案