1
SSIS pakageを実行していて、C#経由でほとんどの作業を行いましたが、追加しようとしているのは各出力テキストファイルのレコード数です。これまでに何も試みません、私はエラーを取得するか、私はすべてのファイルにファイルを置く最初のカウントを取得します。お願いします。おかげ は、この私のスクリプトですSSIS with C#各ファイルの行数を取得しようとしました
// Write the Header Row to File
int ColumnCount = d_table.Columns.Count;
// Dts.Events.FireInformation(0, "DataTable Rows", RecordsInserted.ToString(), "", 0, ref fireAgain);
//
// Write All Rows to the File
foreach (DataRow dr in d_table.Rows)
{
for (int ir = 0; ir < ColumnCount; ir++)
{
if (!Convert.IsDBNull(dr[ir]))
{
sw.Write(dr[ir].ToString());
}
if (ir < ColumnCount - 1)
{
sw.Write(FileDelimiter);
}
// RecordsInserted = dt.Rows.Count;
// Dts.Events.FireInformation(0, "DataTable Rows", RecordsInserted.ToString(), "", 0, ref fireAgain);
}
sw.Write(sw.NewLine);
}
/////////////////////
sw.Write(",Insurance," + rctn);
sw.Write(sw.NewLine);
// sw.Write("Row count: " + RowCount.ToString());
this is some of what i tried but nothing works for me
// sw.Write("Row count: " + RowCount.ToString());
sw.Close();
}
}
}
どうしたらいいですか? – PrestonM