liorlankril
Programmer
I have a Web part code (in c#) that contain this code
PortalContext context = PortalApplication.GetContext();
QueryProvider qp = new QueryProvider(context.SearchApplicationName);
string query = "SELECT "
+ "\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\", "
+ "\"urn:schemas-microsoft-com:sharepointortalrofile:LastName\" "
+ "FROM (TABLE Portal_Content..Scope() UNION ALL "
+ "TABLE Non_Portal_Content..Scope() ) "
+ " WHERE "
+ "((\"urn:schemas.microsoft.com:fulltextqueryinfo:Sourcegroup\" = 'People')) "
+ "AND NOT ((\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\" = '')) "
+ "AND NOT ((\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\" IS NULL)) "
+ "AND ((\"DAV:contentclass\" = 'urn:content-class:SPSPeople') ) "
+ "ORDER BY \"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\"";
DataSet ds = new DataSet();
ds = qp.Execute(query);
I want to get all FirstName and LastName of all portal users profile !
But my code return me no result (0 rows in the DataSet)!!!
Whats wrong?????
PortalContext context = PortalApplication.GetContext();
QueryProvider qp = new QueryProvider(context.SearchApplicationName);
string query = "SELECT "
+ "\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\", "
+ "\"urn:schemas-microsoft-com:sharepointortalrofile:LastName\" "
+ "FROM (TABLE Portal_Content..Scope() UNION ALL "
+ "TABLE Non_Portal_Content..Scope() ) "
+ " WHERE "
+ "((\"urn:schemas.microsoft.com:fulltextqueryinfo:Sourcegroup\" = 'People')) "
+ "AND NOT ((\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\" = '')) "
+ "AND NOT ((\"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\" IS NULL)) "
+ "AND ((\"DAV:contentclass\" = 'urn:content-class:SPSPeople') ) "
+ "ORDER BY \"urn:schemas-microsoft-com:sharepointortalrofile:FirstName\"";
DataSet ds = new DataSet();
ds = qp.Execute(query);
I want to get all FirstName and LastName of all portal users profile !
But my code return me no result (0 rows in the DataSet)!!!
Whats wrong?????