Executes the query and returns data row.
This method is used in conjunction with the properties CommandType, CommandText and Parameters.
Namespace: Nemiro.Data.SqlAssembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
Syntax
Return Value
Type: DataRowExceptions
Exception | Condition |
---|---|
SqlException | The exception that is thrown when SQL Server returns a warning or error. |
Examples
using (SqlClient c = new SqlClient()) { c.CommandText = "SELECT * FROM users WHERE login = 'anylogin';"; DataRow row = c.GetRow(); if(row != null) { Console.WriteLine("nickname = {0}", row["nickname"]); } }
See Also