pb 全局 判断 数据库 是否连接成功
我现在有好多窗口里面有select 语句 using sqlca,当数据库处于不可用状态时候,怎么去做全局判断?不可能每个select都去判断一下。
[解决办法]
这个没有啥好办法。
只是可以从改善网络状况,搭建VPN 等,使系统更稳定,事务连接更可靠而已。
[解决办法]
pb11.5以后可以,
继承transaction,在DBError事件里面写上连接判断与恢复的语句,
再将SQLCA的父类设置为你定义的新类
ArgumentDescription
codeLong by value. A database-specific error code. See your DBMS documentation for information on the meaning of the code.When there is no error code from the DBMS, code contains one of these values:-1 - Cannot connect to the database-2 - Writing a blob to the database failed-4 - All other errors (see Usage note for more detail)
sqlerrortextString by value. A database-specific error message.
sqlsyntaxString by value. The full text of the SQL statement being sent to the DBMS when the error occurred.
pb 大局 判断 数据库 是否连接成功
pb全局 判断 数据库 是否连接成功我现在有好多窗口里面有select 语句 using sqlca,当数据库处于不可用状态
