コード例 #1
0
 private void Completing(MssqlCommandState state)
 {
     try
     {
         if (state.Reader != null)
         {
             Result = GetResult(state.Reader);
         }
         var typeIgnore = typeof(MssqlCommandParameterIgnore);
         var ordinal    = 0;
         P0 = GetParameterValue(state.Command, typeIgnore, P0, ref ordinal);
         P1 = GetParameterValue(state.Command, typeIgnore, P1, ref ordinal);
         P2 = GetParameterValue(state.Command, typeIgnore, P2, ref ordinal);
         P3 = GetParameterValue(state.Command, typeIgnore, P3, ref ordinal);
         P4 = GetParameterValue(state.Command, typeIgnore, P4, ref ordinal);
         P5 = GetParameterValue(state.Command, typeIgnore, P5, ref ordinal);
         P6 = GetParameterValue(state.Command, typeIgnore, P6, ref ordinal);
         P7 = GetParameterValue(state.Command, typeIgnore, P7, ref ordinal);
         P8 = GetParameterValue(state.Command, typeIgnore, P8, ref ordinal);
         P9 = GetParameterValue(state.Command, typeIgnore, P9, ref ordinal);
         state.Dispose();
         EndExecuteEvent(Je.cmd.EmptyEventArgs(this));
     }
     catch (Exception e)
     {
         state.Dispose();
         Finalize(e);
     }
 }
コード例 #2
0
        protected override void Execute()
        {
            var datasets = new List <MssqlCommandBulkCopyDataSet>();
            var cmd      = BuildCommand(datasets);

            if (cmd.Connection.State != ConnectionState.Open)
            {
                cmd.Connection.Open();
            }
            MssqlCommandBulkCopy.WriteToServer(cmd.Connection, datasets);
            var state = new MssqlCommandState(cmd);

            cmd.BeginExecuteReader(EndExecuteReader, state);
        }