SqlClient GetRow Method (String)Nemiro.Data.dll
Executes the query and returns data row.

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

public DataRow GetRow(
	string sql
)

Parameters

sql
Type: System String
Query SQL, to be executed.

Return Value

Type: DataRow
Exceptions

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

using (SqlClient c = new SqlClient())
{
  DataRow row = c.GetRow("SELECT * FROM users WHERE login = 'anylogin';");
  if(row != null)
  {
    Console.WriteLine("nickname = {0}", row["nickname"]);
  }
}
See Also