public DataSet SearchSharePointImageStore(SearchDS search) { // DataSet ds = null; try { string SQL = getSQLQuery(search.SearchTable[0].ScopeName); SQL = SQL.Replace("selectStmnt", getSelectClause(search.SearchTable[0].DocumentClass)).Replace("whereClause", getWhereClause(search)).Replace("MaxSearchResults", search.SearchTable[0].MaxResults.ToString()); rgxvmsp.QueryService qs = new rgxvmsp.QueryService(); qs.Credentials = getCredentials(); qs.PreAuthenticate = true; //qs.Timeout = 500000; //Default 100000 msec qs.Url = WebConfigurationManager.AppSettings["rgxvmsp.spsearch"].ToString(); qs.Credentials = getCredentials(); ds = qs.QueryEx(SQL); } catch (Exception ex) { throw new ApplicationException("Unexpected error in SearchSharePointImageStore(SearchDS).", ex); } return(ds); }
public DataSet SearchSharePointImageStore(SearchRequest request) { // DataSet ds = null; try { string SQL = getSQLQuery(request.ScopeName); SQL = SQL.Replace("selectStmnt", getSelectClause(request.DocumentClass)).Replace("whereClause", getWhereClause(request)).Replace("MaxSearchResults", request.MaxResults.ToString()); rgxvmsp.QueryService qs = new rgxvmsp.QueryService(); qs.Credentials = getCredentials(); qs.PreAuthenticate = true; //qs.Timeout = 500000; //Default 100000 msec qs.Url = WebConfigurationManager.AppSettings["rgxvmsp.search"].ToString(); qs.Credentials = getCredentials(); ds = qs.QueryEx(SQL); } catch (Exception ex) { throw new FaultException <EnterpriseFault>(new EnterpriseFault(ex.Message), "Service Error"); } return(ds); }