Hello,
I have two datasources. The first one pulls data from a Stored Procedure.
The second one from an SQL String. They both get there parameter value from
a GridView (ControlID="gvSearchList"). I've tested the stored procedure
datasource when building it (putting in an example for the 2nd paramater)
with the correct results. However, when I bind a GridView to it, nothing
shows, but if I bind it to the second datasource, the GridView shows data.
Any help would be appreciated.
--
Thanks in advance,
sck10
Stored Procedure Data Source
--------------------------------
<asp:SqlDataSource ID="dsCustRevList" runat="server"
ConnectionString="<%$ ConnectionStrings:cnnFundTrack %>"
SelectCommand="sproc_web_ServicePortfolio"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="FindPortfolioCustomerRevenueOne"
Name="strParm01" Type="String" />
<asp:ControlParameter ControlID="gvSearchList"
DefaultValue="NoParameter" Name="strParm02" PropertyName="SelectedValue"
Type="String" />
<asp:Parameter Name="strParm03" Type="String" />
<asp:Parameter Name="strParm04" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
SQL DataSource
------------------
<asp:SqlDataSource ID="dsCustRevListQuery" runat="server"
ConnectionString="<%$ ConnectionStrings:cnnFundTrack %>"
SelectCommand="
SELECT
CustomerRevenue_ID,
ServiceName,
Customer,
Region,
RevenueQtr01 + RevenueQtr02 + RevenueQtr03 + RevenueQtr04,
RevenueImpactType,
RevenueYear,
AnnualForecastRevenue
FROM tblServicePortfolio_Customer_Revenue
WHERE (ServiceName = @ServiceName)
ORDER BY RevenueYear DESC, Customer, Region, RevenueImpactType">
<SelectParameters>
<asp:ControlParameter
ControlID="gvSearchList"
DefaultValue="NoParameter"
Name="ServiceName"
PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>