SqlClient GetTable Method Nemiro.Data.dll
Executes the query and returns DataTable. This method is used in conjunction with the properties CommandType, CommandText and Parameters.

Namespace: Nemiro.Data.Sql
Assembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
Syntax

public DataTable GetTable()

Return Value

Type: DataTable
Exceptions

ExceptionCondition
SqlExceptionThe exception that is thrown when SQL Server returns a warning or error.
Examples

using (SqlClient c = new SqlClient())
{
  c.CommandText = "SELECT * FROM users;";
  DataTable table = c.GetTable();
  foreach(DataRow row in table.Rows)
  {
    Console.WriteLine("login = {0}", row["login"]);
  }
}
See Also