Esempio n. 1
0
        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);
            }
        }
Esempio n. 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);
            }
        }