Posted: 4/25/2012
hi
i am adding my dataset like this
EXEC [pPortfolioDashboard1]---------- Required parameter------------@SessionGuid = @SessionGuid,@FromDate = @FromDate, @ToDate = @ToDate, @ClassificationID = @ClassificationID,@Date = @Date, @Portfolios = @Portfolios,------------optional parameter-----------------------
gives me error like
@Portfolios or @PortfolioObjectID cannot both be null, one must be populated@Portfolios or @PortfolioObjectID cannot both be null, one must be populated@Portfolios or @PortfolioObjectID cannot both be null, one must be populated@Portfolios or @PortfolioObjectID cannot both be null, one must be populatedAn error occurred while getting new row from user defined Table Valued Function : System.ApplicationException: @Portfolios or @PortfolioObjectID cannot both be
any idea?
Your table valued function is returning null for both @Portfolios and @PortfolioObjectID in at least one row. Figure out why they are both returning null and you should be able to figure out how to fix it.
daniel.my sp returns correct result.
i dotn know how to check each of the function
"i dotn know how to check each of the function"
In your Microsoft SQl Server Management Studio run the query:
select * from YourSchema.dbo.pPortfolioDashboard1(function parameters)
they are working fine individually.
if i do hardcode in sp .the error goes away
something like thid
alter procedure [pPortfolioDashboard1]------Required parameter----------------@SessionGuid nvarchar(48),@FromDate datetime, @ToDate datetime, @ClassificationID int, @Date datetime, @Portfolios nvarchar(max) as begin declare @ReportData varbinary(max) exec pPerformanceHistoryPeriod---------required parameter------------------ @ReportData = @ReportData out, @Portfolios = 'case', @PortfolioObjectID = null, @FromDate = '01/31/2010', @ToDate = @ToDate, @ClassificationID = @ClassificationID,
if you see here ,if i do hardcode for portfolio , the next error is todate cannot be null.
so ites not taking value
the code should be
@Reportdata = @Reportdata,
what is the solution?