コード例 #1
0
        public override void FillAdapter(IDataAdapterARemplissagePartiel adapter, DataSet ds, int startRecord, int maxRecords, string srcTable)
        {
            ds.EnforceConstraints = false;
            int nNbTry = 3;

            while (nNbTry > 0)
            {
                try
                {
                    base.FillAdapter(adapter, ds, startRecord, maxRecords, srcTable);
                    break;
                }
                catch (Exception e)
                {
                    nNbTry--;
                    if (nNbTry == 0)
                    {
                        throw e;
                    }
                    GC.Collect();
                    System.Threading.Thread.Sleep(100);
                }
            }
            CorrigeErreursDbNull(ds);
            ds.EnforceConstraints = true;
        }
コード例 #2
0
 //--------------------------------------------------------------------------
 public void FillAdapter(IDataAdapterARemplissagePartiel adapter, DataSet ds, int startRecord, int maxRecords, string srcTable)
 {
     lock (m_lockerAdapter)
     {
         adapter.Fill(ds, startRecord, maxRecords, srcTable);
     }
 }