Windward Engine API Reference
AdoDataSourceImpl Class
Members  See Also  Send comments on this topic.
net.windward.api.csharp Namespace : AdoDataSourceImpl 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

AdoDataSourceImpl Class

Syntax

Visual Basic (Declaration) 
Public Class AdoDataSourceImpl 
   Inherits DataSourceImplBase
   Implements WindwardInterfaces.net.windward.api.csharp.IReportDataSource 
Visual Basic (Usage)Copy Code
Dim instance As AdoDataSourceImpl
Managed Extensions for C++ 
public __gc class AdoDataSourceImpl : public DataSourceImplBase, WindwardInterfaces.net.windward.api.csharp.IReportDataSource  
C++/CLI 
public ref class AdoDataSourceImpl : public DataSourceImplBase, WindwardInterfaces.net.windward.api.csharp.IReportDataSource  

Inheritance Hierarchy

System.Object
   net.windward.api.csharp.DataSourceImplBase
      net.windward.api.csharp.AdoDataSourceImpl

Requirements

Namespace: net.windward.api.csharp

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP, Windows Vista, Windows Server 2003 family

Assembly: WindwardReportsAPI (in C:\agent\_work\1\s\Engine\DotNetEngine\WindwardReportsAPI\bin\Release\WindwardReportsAPI.dll)

See Also

© 2019 All Rights Reserved.