コード例 #1
0
ファイル: DataProvider.cs プロジェクト: mengshuaiyang/DbEntry
 private void ExecuteDataset(SqlStatement sql, DataSet ds)
 {
     DbEntry.UsingConnection(delegate
     {
         using (IDbCommand e = GetDbCommand(sql))
         {
             IDbDataAdapter d = InnerDriver.GetDbAdapter(e);
             if (Dialect.ExecuteEachLine)
             {
                 int i = 0;
                 foreach (string s in Split(e.CommandText))
                 {
                     e.CommandText = s;
                     ((DbDataAdapter)d).Fill(ds, 0, DataSettings.MaxRecords, "Table" + i);
                     i++;
                 }
             }
             else
             {
                 d.Fill(ds);
             }
             PopulateOutParams(sql, e);
         }
     });
 }