Gemstone Data Library
Show/Hide TOC

# DataExtensionsRetrieveRow(DbCommand, Int32, String, Object) Method

Executes the SQL statement using DbCommand, and returns the first DataRow in the result set.

## Definition

Namespace: Gemstone.Data.DataExtensions
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.152 -- Release Build+3b6829d9645b31d6fc0c4a03e68df9622cb42dfb
C#
View Source Request Example

    public static DataRow RetrieveRow(
    	this DbCommand command,
    	int timeout,
    	string sql,
    	params Object?[] parameters
    )

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Function RetrieveRow (
    	command As DbCommand,
    	timeout As Integer,
    	sql As String,
    	ParamArray parameters As Object()
    ) As DataRow

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    static DataRow^ RetrieveRow(
    	DbCommand^ command,
    	int timeout,
    	String^ sql,
    	... array<Object^>^ parameters
    )

JavaScript
View Source Request Example

    Gemstone.Data.DataExtensions.DataExtensions.RetrieveRow = function(command, timeout, sql, ... parameters);

#### Parameters

command DbCommand
  The DbCommand to use for executing the SQL statement.
timeout Int32
  The time in seconds to wait for the SQL statement to execute.
sql String
  The SQL statement to be executed.
parameters Object
  The parameter values to be used to fill in DbParameter parameters identified by '@' prefix in sql expression.

#### Return Value

DataRow
The first DataRow in the result set.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DbCommand. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## See Also

#### Reference

DataExtensions Class
RetrieveRow Overload
Gemstone.Data.DataExtensions Namespace