Databases Reference
In-Depth Information
C#
public int CommandTimeout
{ // Implemented the Property for consistency but it is not used.
get { return 0; }
}
VB.NET
Public Property CommandTimeout() As Integer _
Implements IDbCommand.CommandTimeout
Get
Return 0
End Get
Set(ByVal Value As Integer)
End Set
End Property
CommandType Property
Most data processing extensions allow the developer to pass in a command as text, or they can pass in a
fully initialized command object for the Execute reader method to examine and use. The
DataSetCommand class only accepts text, and any other type will cause your component to throw a
NotSupported exception.
C#
public CommandType CommandType
{ // supports only a text commandType
get { return CommandType.Text; }
set { if (value != CommandType.Text) throw new NotSupportedException(); }
}
VB.NET
Public Property CommandType() As CommandType _
Implements IDbCommand.CommandType
Get
Return CommandType.Text
End Get
Set(ByVal Value As CommandType)
If Value <> CommandType.Text Then
Throw New NotSupportedException
End If
End Set
End Property
CreateParameter Function
The CreateParameter returns an extension-specific parameter to the command object. The method must
be supported due to the interface requirements, although it is not actually used. The DataSetParameter
object is a simple class that implements another interface called IDataParameter, which allows it to be
returned as an object of the interface type.
Search WWH ::




Custom Search