Gemstone Data Library
Show/Hide TOC

# DataExtensionsRetrieveDataSet(DbConnection, String, Object) Method

Executes the SQL statement using DbConnection, and returns the DataSet that may contain multiple tables, depending on the SQL statement.

## Definition

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

    public static DataSet RetrieveDataSet(
    	this DbConnection connection,
    	string sql,
    	params Object?[] parameters
    )

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Function RetrieveDataSet (
    	connection As DbConnection,
    	sql As String,
    	ParamArray parameters As Object()
    ) As DataSet

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    static DataSet^ RetrieveDataSet(
    	DbConnection^ connection,
    	String^ sql,
    	... array<Object^>^ parameters
    )

JavaScript
View Source Request Example

    Gemstone.Data.DataExtensions.DataExtensions.RetrieveDataSet = function(connection, sql, ... parameters);

#### Parameters

connection DbConnection
  The DbConnection to use for executing the SQL statement.
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

DataSet
A DataSet object.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DbConnection. 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
RetrieveDataSet Overload
Gemstone.Data.DataExtensions Namespace