Windward Engine API Reference
AdoDataSource Class
Members  See Also  Send comments on this topic.
WindwardReportsDrivers.net.windward.datasource.ado Namespace : AdoDataSource Class




Glossary Item Box

This supplies a data source to Windward Reports using ADO.NET. The DataSourceProvider class is built on the concept of xml nodes. For this class, a node is a DbDataReader returned by a ADO call to DbCommand.ExecuteReader().
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: The use of result[N] where N is a row number is limited to values of 0...N where N is step-1. result[1] is treated as column 1 of the row presently on, it is only result[0][1] and result[0].NAME that can hit rows other than the row presently on. This functionality requires a result set that can move to previous as well as next. If the ADO driver you use cannot handle a call to previous, you cannot use this functionality. An <if select= ... > will return true if the passed in select returns a DbDataReader with one or more rows. An <if select="select count (*) from customers" notEmpty="true"> will perform two steps. The first step is it will return false if there are no results returned. If results are returned it assumes the select is a count and will do a return DbDataReader.getInt(1) > 0;. This does not look at the select statement, it is the notEmpty="true" that puts it in this mode.

Object Model

AdoDataSource ClassIDataSourceMetaData Interface

Syntax

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  

Inheritance Hierarchy

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)

See Also

© 2019 All Rights Reserved.