日期:2014-05-17 浏览次数:21075 次
string sql = @"SELECT * FROM DBCENTERUSER WHERE USERNAME = @UserName ";
OleDbParameter parameter = new OleDbParameter("@UserName",userName);
OleDbDataReader dataReader = DBSQLHelper.ExecuteReader(sql, parameter);
public static OleDbDataReader ExecuteReader(string sql, OleDbParameter value)
{
OleDbCommand cmd = new OleDbCommand(sql, Connection);
cmd.Parameters.Add(value);
OleDbDataReader reader = cmd.ExecuteReader();
return reader;
}