An xml file always has the concept of the current node. This is not the case with a sql database - there is no current DbDataReader. A DbDataReader is only generated by the wr:query and the wr:foreach tags. Therefore, all other tags only make sense if they use the var attribute from a query or foreach to identify the DbDataReader they are to be applied to. A tag not identifying a DbDataReader will throw an exception.
A query or foreach tag can reference a var from another query or foreach tag using ${var.item}.. An XPath query can describe a node as well as an element. In this class a query defines a DbDataReader and is only an element.
Also, with xml you can use xpath in each tag performing complex logic in determining what text to return. It is very different for sql. The foreach or query can have complex logic. But the other tags can only return an element from a result set that the foreach/query earlier returned or do a single select.
When using a var (<wr:forEach var="result"/>) that identifies a result set, you can use the following in a tag:
- ${result[1]} - is column element [1] in the row presently on (1-based)
- ${result[2][1]} - is column element [1] in the row + 2 presently on (0-based)
- ${result.NAME} - is the column element named NAME in the row presently on
- ${result[2].NAME} - is the column element named NAME in the row + 2 presently on
- ${result.columnNames[1]} - is the name of column 1 (1-based)
return DbDataReader.getInt(1) > 0;
. This does not look at the select statement, it is the notEmpty="true" that puts it in this mode.
Visual Basic (Declaration) | |
---|---|
Public Class AdoDataSource Inherits net.windward.datasource.abstract_datasource.AbstractDataSource Implements net.windward.datasource.DataSourceProvider, WindwardInterfaces.net.windward.datasource.IDataSourceProviderMetaData |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AdoDataSource |
C# | |
---|---|
public class AdoDataSource : net.windward.datasource.abstract_datasource.AbstractDataSource, net.windward.datasource.DataSourceProvider, WindwardInterfaces.net.windward.datasource.IDataSourceProviderMetaData |
Managed Extensions for C++ | |
---|---|
public __gc class AdoDataSource : public net.windward.datasource.abstract_datasource.AbstractDataSource, net.windward.datasource.DataSourceProvider, WindwardInterfaces.net.windward.datasource.IDataSourceProviderMetaData |
C++/CLI | |
---|---|
public ref class AdoDataSource : public net.windward.datasource.abstract_datasource.AbstractDataSource, net.windward.datasource.DataSourceProvider, WindwardInterfaces.net.windward.datasource.IDataSourceProviderMetaData |
System.Object
java.lang.Object
net.windward.datasource.DataSourceBase
net.windward.datasource.abstract_datasource.AbstractDataSource
WindwardReportsDrivers.net.windward.datasource.ado.AdoDataSource
Requirements
Namespace: WindwardReportsDrivers.net.windward.datasource.ado
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP, Windows Vista, Windows Server 2003 family
Assembly: WindwardReportsDrivers (in C:\agent\_work\1\s\Engine\DotNetEngine\WindwardReportsDrivers\bin\Release\WindwardReportsDrivers.dll)