public static IDataReader GetDataReader(string sqlQuery)
{
//using (SqlConnection connection =
// new SqlConnection(ConnectionString))
// {
// Open the connection in a try/catch block.
// Create and execute the DataReader, writing the result
// set to the console window.
try
{
SqlConnection connection = new SqlConnection(ConnectionString);
// Create the Command and Parameter objects.
SqlCommand command = new SqlCommand(sqlQuery, connection);
//command.Parameters.AddWithValue("@pricePoint", paramValue);
connection.Open();
SqlDataReader reader = command.ExecuteReader();
return reader;
}
catch (Exception ex)
{
throw (ex);
}
}