Class WMDataReader
Represents a data query that is to be executed on the associated IWMDataSource.
Implements
Inherited Members
Namespace: Quantellia.WMServer.Asset.DataBinding
Assembly: WMServer.dll
Syntax
public class WMDataReader : WMAssetBase, IWMParameterizedAsset, IWMExecutableAsset, IWMAsset, IDbEntity, IWMEntity, IDocumentedEntity, INamedEntity, IWMAssetDirectoryMember, IWMPrincipalOwned
Constructors
WMDataReader()
Default constructor
Declaration
public WMDataReader()
WMDataReader(string)
Constructor that initializes the ID
Declaration
public WMDataReader(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id |
Fields
ExecuteNonQuery
Run a command that does not return a value.
Declaration
public const int ExecuteNonQuery = 2
Field Value
Type | Description |
---|---|
int |
Select
Run a command that returns a table of values.
Declaration
public const int Select = 0
Field Value
Type | Description |
---|---|
int |
SelectValue
Run a command that returns a single value.
Declaration
public const int SelectValue = 1
Field Value
Type | Description |
---|---|
int |
Properties
Action
Declaration
public int Action { get; set; }
Property Value
Type | Description |
---|---|
int |
DataSource
Reference to the data source that will execute the query.
Declaration
public IWMDataSource DataSource { get; set; }
Property Value
Type | Description |
---|---|
IWMDataSource |
Remarks
When first retrieved, the Data Source reference may be a ProxyAsset. If this is the case,
the first time the get
accessor is called, it will fetch the details of the actual data source and
replace the proxy with the actual.
Parameters
Declaration
public ElementValue Parameters { get; set; }
Property Value
Type | Description |
---|---|
ElementValue |
Remarks
The value should be an instance of ObjectValue where each key/value pair in the object corresponds to a name/value pair in the data query's parameter list.
SourceString
The command string for the query.
Declaration
public string SourceString { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Execute(ElementValue)
Execute the query with the specified parameters.
Declaration
public ElementValue Execute(ElementValue parameters)
Parameters
Type | Name | Description |
---|---|---|
ElementValue | parameters |
Returns
Type | Description |
---|---|
ElementValue |