如果有人需要 ADODB.Connection 事件的骨架接收器
class ADOConnectionEventSink {
function BeginTransComplete( $translevel, $objerror, $status, $objconn ) {
return 0;
}
function CommitTransComplete( $objerror, $status, $objconn ) {
return 0;
}
function RolbackTransComplete( $objerror, $status, $objconn ) {
return 0;
}
function WillConnect ( $ConnectionString, $userid, $psword, $options, $status, $objconn ) {
return 0;
}
function ConnectComplete ( $objerror, $status, $objconn) {
return 0;
}
function Disconnect( $status, $objConn ) {
return 0;
}
function WillExecute ( $src, $cursortyp, $locktyp, $options, $status, $objcomm, $objrs, $objconn ) {
return 0;
}
function ExecuteComplete ( $recaffected, $objerror, $status, $objcomm, $objrs, $objconn ) {
return 0;
}
function InfoMessage ( $objerror, $status, $objconn) {
return 0;
}
}
// 稍后...
$db = new COM("ADODB.Connection", NULL, $charPage);
$sink = new ADOConnectionEventSink();
com_event_sink($db, $sink, "ConnectionEvents");
//...