C# ReadOnlyChild template confusion

C# ReadOnlyChild template confusion

Old forum URL: forums.lhotka.net/forums/t/1954.aspx


albruan posted on Monday, December 11, 2006

I've attempted to create a read-only child object based on a sproc and receive an error message about Unique Column(s) being required.  My sproc returns only one result set, so I have the ResultSetIndex set to 0.  I didn't enter anything for UniqueColumnNames entry as the message states that they are required "when using RootView or when ResultSetIndex > 0."  My sproc is as follows:

CREATE PROC GetReportCategories
      @projID
uniqueidentifier
AS

SET NOCOUNT ON

SELECT d.DeptName, c.CategoryCode, c.CategoryDesc
FROM Departments d, Categories c
WHERE d.ProjID = @projID
AND d.DeptID = c.DeptID
ORDER BY d.DeptName

Do I need an entry under UniqueColumnNames and, if so, what should they be?

rasupit replied on Tuesday, December 12, 2006

You'll need to enter the UniqueColumnNames and and change the ResultSetIndex to 0.  I can't tell you exactly which column is the unique column by just looking at the sp.  I can only guess that DeptName is.

Ricky

Copyright (c) Marimer LLC