Example #1
0
        /// <include file='..\..\..\..\..\..\..\doc\snippets\Microsoft.Data.SqlClient\SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/InitializeBatching/*' />
        override protected void InitializeBatching()
        {
            Bid.Trace("<sc.SqlDataAdapter.InitializeBatching|API> %d#\n", ObjectID);
            _commandSet = new SqlCommandSet();
            SqlCommand command = SelectCommand;

            if (null == command)
            {
                command = InsertCommand;
                if (null == command)
                {
                    command = UpdateCommand;
                    if (null == command)
                    {
                        command = DeleteCommand;
                    }
                }
            }
            if (null != command)
            {
                _commandSet.Connection     = command.Connection;
                _commandSet.Transaction    = command.Transaction;
                _commandSet.CommandTimeout = command.CommandTimeout;
            }
        }
Example #2
0
        /// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/InitializeBatching/*' />
        protected override void InitializeBatching()
        {
            SqlClientEventSource.Log.TraceEvent("<sc.SqlDataAdapter.InitializeBatching|API> {0}", ObjectID);
            _commandSet = new SqlCommandSet();
            SqlCommand command = SelectCommand;

            if (null == command)
            {
                command = InsertCommand;
                if (null == command)
                {
                    command = UpdateCommand;
                    if (null == command)
                    {
                        command = DeleteCommand;
                    }
                }
            }
            if (null != command)
            {
                _commandSet.Connection     = command.Connection;
                _commandSet.Transaction    = command.Transaction;
                _commandSet.CommandTimeout = command.CommandTimeout;
            }
        }
Example #3
0
 /// <include file='..\..\..\..\..\..\..\doc\snippets\Microsoft.Data.SqlClient\SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/TerminateBatching/*' />
 override protected void TerminateBatching()
 {
     if (null != _commandSet)
     {
         _commandSet.Dispose();
         _commandSet = null;
     }
 }
Example #4
0
        /// <include file='..\..\..\..\..\..\..\doc\snippets\Microsoft.Data.SqlClient\SqlDataAdapter.xml' path='docs/members[@name="SqlDataAdapter"]/InitializeBatching/*' />
        protected override void InitializeBatching()
        {
            _commandSet = new SqlCommandSet();
            SqlCommand command = SelectCommand;

            if (null == command)
            {
                command = InsertCommand;
                if (null == command)
                {
                    command = UpdateCommand;
                    if (null == command)
                    {
                        command = DeleteCommand;
                    }
                }
            }
            if (null != command)
            {
                _commandSet.Connection     = command.Connection;
                _commandSet.Transaction    = command.Transaction;
                _commandSet.CommandTimeout = command.CommandTimeout;
            }
        }