I have the following code:
public static DataTable GetDataTable(string sConnStr, string sTable)
{
DataTable dt = new DataTable();
SqlConnection sqlC
Don't use a SqlDataReader, use a SqlDataAdapter. A DataReader is for fast, forward-only operations, while the DataAdapter is geared towards set-based operations.
See MSDN: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx
See http://www.dotnetperls.com/sqldataadapter for a simple example.