QuickObjects.DBLibrary Send comments on this topic.
GetNewAdapterInstance Method
See Also 
Akal.QuickObjects.DBLibrary Namespace > DatabaseObjectSQL Class : GetNewAdapterInstance Method
command

GetNewAdapterInstance

GetNewAdapterInstance creates a new instance of IDbDataAdapter compatible data adapter depending on the type of connection object stored in DBConnection property.

If the DBConnection property holds an OracleConnection then a OracleDataAdapter is created, however if the DBConnection property holds an SqlConnection then a SqlDataAdapter is created.

The passed in command object is passed to the data adapter. The command object must match the connection type i.e. If the DBConnection is set to SqlConnection then an instance of SqlCommand must be passed.

In normal scenarios there will not be a need to call this method, but it is provided for situations where a complex query has to be run which is not supported directly by this library.

Parameters:
Description
commandPass either a SqlCommand or OracleCommand based on the type of connection set in DBConnection.

Returns:
Type
IDbDataAdapter

Syntax

C# 
protected IDbDataAdapter GetNewAdapterInstance( 
   IDbCommand command
)

Parameters

command

Requirements

Target Platforms: .NET Framework 1.1 or .NET Framework 2.0

See Also