/// <summary>
/// Instantiate the class with a complete SQL statement.
/// </summary>
/// <example>
/// <code>
/// using Argentini.Halide;
/// ...
/// H3DataRow dataRow = new H3DataRow("SELECT TOP 1 * FROM Data WHERE ID=5;", "SqlServer01");
/// </code>
/// </example>
/// <param name="sqlCommand">Complete SQL command string to use for reading the desired row.</param>
/// <param name="UseconnectionStringName">Name of a connection string within the Web.config file.</param>
public H3DataRow(String sqlCommand, String UseconnectionStringName)
{
ConnectionStringName = UseconnectionStringName;
DataPresent = false;
using (H3Reader reader = new H3Reader(sqlCommand, true, UseconnectionStringName))
{
if (reader.HasRows)
{
DataPresent = true;
reader.Read();
Column = new DatabaseRow(reader);
}
else
{
Column = new DatabaseRow();
}
}
}