1,178
社区成员
发帖
与我相关
我的任务
分享
//解决BCB6.0的编译问题,于本主题无关
namespace System
{
void __fastcall CheckSafecallResult(HRESULT hResult)
{
OleCheck(hResult);
}
};
//---------------------------------------------------------------------------
void __fastcall TMainDm::my_AdoConnExecuteComplete(
TADOConnection *Connection, int RecordsAffected, const Error *Error,
TEventStatus &EventStatus, const _Command *Command,
const _Recordset *Recordset)
{
if(EventStatus != esOK ){
bool bDisconnected = false;
for(int i=0;i<my_AdoConn->Errors->Count;i++){
String str = my_AdoConn->Errors->Item[i]->Description;
if(str.Pos("ORA-01012") || str.Pos("ORA-03114"))
{
bDisconnected = true;
break;
}
}
if(bDisconnected){
String chnMsg = "你的程序已经和服务器失去联系,请重新登陆.;";
ShowMessage(chnMsg);
PostQuitMessage(0);
}
}
}
//---------------------------------------------------------------------------