コード例 #1
0
ファイル: VfpCommand.cs プロジェクト: theparker/VfpClient
        protected internal VfpCommand(OleDbCommand oleDbCommand, VfpConnection vfpConnection)
        {
            CommandId = Interlocked.Increment(ref _globalCommandId);
            _vfpCommandParameterRewritter = new VfpCommandParameterRewritter();
            OleDbCommand = oleDbCommand;
            Connection   = vfpConnection;

            if (OleDbCommand.Transaction != null)
            {
                _vfpTransaction = new VfpTransaction(OleDbCommand.Transaction, _vfpConnection);
            }
        }
コード例 #2
0
        protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
        {
            try {
                var oleDbTransaction = OleDbConnection.BeginTransaction(isolationLevel);
                var vfpTransaction   = new VfpTransaction(oleDbTransaction, this);

                return(vfpTransaction);
            }
            catch (OleDbException e) {
                throw new VfpException(e.Message, e);
            }
        }