Possible Bug in Aggregate Data Sources in DVWPs?

I think I’ve found a bug in using aggregate data sources in DVWPs with SQL Stored Procedures.  I’m trying to use the results of a Stored Procedure combined with the content of a list in SharePoint.  I’ve isolated the issue to the Stored Procedure. The first asp:SqlDataSource statement below is what I want the data source to be; the second is a simple select from a SQL table. The former does not work, while the latter does. I’ve tested it in a totally stripped down page where there is nothing but the DVWP.

The Stored Procedure works fine by itself; the issue arises when I try to use it in an aggregate data source with any other type of data source.

I’m guessing it is a bug, and I think we’ll try exposing the Stored Procedure as a Web Service, which should get around the issue.

<asp:SqlDataSource
  runat="server"
  ProviderName="System.Data.SqlClient"
  ID="SqlDataSource3"
  SelectCommandType="StoredProcedure"
  ConnectionString="Data Source=sqlserver;User ID=moss_dev;Password=moss4U;Initial Catalog=DistSelector;"
  SelectCommand="dbo.[DistributorLocator] ">

 

<asp:SqlDataSource
  runat="server"
  ProviderName="System.Data.SqlClient"
  ID="SqlDataSource3"
  SelectCommandType="Text"
  ConnectionString="Data Source=sqlserver;User ID=moss_dev;Password=moss4U;Initial Catalog=DistSelector;"
  SelectCommand="SELECT [T_DistLocator] . * FROM [T_DistLocator] ">

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.