/// <summary>
/// Checks clumn Name
/// </summary>
/// <param name="reader">IDataReader</param>
/// <param name="columnName">column name</param>
/// <returns>bool</returns>
private bool CheckColumnName(IDataReader reader, string columnName)
{
bool result = false;
DataTable dt = reader.GetSchemaTable();
foreach (DataRow dr in dt.Rows)
{
if (dr["ColumnName"].ToString() == columnName)
result = true;
}
return result;
}
原文地址:https://www.cnblogs.com/kejie/p/8384023.html
时间: 2024-11-18 05:18:38