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.138 -- Release Build+f7ceb3e02ea3c92b27e86b99ae16cee337a20b9e
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