KBM服务端的 UniConnection 要实现断线重连(连接 MSSQLServer), 需要以下几个步骤: 一.修改单元文件:kbmMWUniDAC.pas procedure TkbmMWUNIDACConnection.InternalOpenConnection(ConnectionPool:TkbmMWCustomConnectionPool); begin // Create new database connection using template. with TkbmMWU
两种方式解决1.你可以配置mysql的连接池 var mysql = require('mysql'); var pool = mysql.createPool({ host: 'localhost', user: 'nodejs', password: 'nodejs', database: 'nodejs', port: 3306 }); var selectSQL = 'select * from t_user limit 10'; pool.getConnection(function