Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Catalog > Is it possible ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 669 of 763
Post > Topic >>

Is it possible to sort products by DisplayName in a Virtual Catalog?

by simon.grimes@[EMAIL PROTECTED] Sep 9, 2006 at 12:58 AM

Morning,

If we perform a simple catalog search and set the CatalogSearchOptions
to both return and sort by DisplayName and then run this against a
category on the base catalog it returns all the matches ordered as
expected. If I run the same search against a virtual catalog it throws
a CatalogDatabaseException, "{"Category search failed."}"  with
inner exception SqlException, "{"Invalid column name
'DisplayName'."}"- remove the sort and it works - bind the
results to a grid and you can see the DisplayName column is there and
populated.

Is there anyway to sort by DisplayName in a virtual catalog?

Code Snipit:

searchOptions.PropertiesToReturn = "DisplayName";
searchOptions.SortProperty = "DisplayName";

catalogSearch.CategoryName = "My category";
catalogSearch.Recursive = true;
catalogSearch.UseAdvancedFreeTextSearch = true;
catalogSearch.AdvancedFreeTextSearchPhrase = "\"" + searchstuff + "\"";
catalogSearch.SearchOptions = searchOptions;

catalogItemsDataset = catalogSearch.Search(out totalRecords);

Stack Trace:


[SqlException (0x80131904): Invalid column name 'DisplayName'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolean breakConnection) +861578
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +738774

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
+1959
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
   System.Data.SqlClient.SqlDataReader.get_MetaData() +62
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString) +297
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async) +903
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method, DbAsyncResult result) +132
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior, String method) +122
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
behavior) +12

System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior) +7
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +141
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +83

Microsoft.CommerceServer.Catalog.Internal.SqlHelper.ExecuteDataset(SqlConnection
connection, CommandType commandType, String commandText,
CatalogDataSetType catalogDataSetType, SqlParameter[]
commandParameters, String outParameterName, Object& outParameterValue)
+177

Microsoft.CommerceServer.Catalog.Internal.SqlHelper.ExecuteDataset(String
connectionString, CommandType commandType, String commandText,
SqlParameter[] commandParameters, CatalogDataSetType
catalogDataSetType, String outParameterName, Object& outParameterValue)
+121

Microsoft.CommerceServer.Catalog.Internal.SqlHelper.ExecuteDataset(String
connectionString, String spName, Object[] parameterValues,
CatalogDataSetType catalogDataSetType, String outParameterName, Object&
outParameterValue) +101

Microsoft.CommerceServer.Catalog.Internal.SqlHelper.ExecuteDataset(ExecutionContext
executionContext, String spName, Object[] parameterValues,
CatalogDataSetType catalogDataSetType, String outParameterName, Object&
outParameterValue) +211

Microsoft.CommerceServer.Catalog.Internal.Category.Search(CatalogExecutionContext
executionContext, String sqlClause, String ftsPhrase, String
advancedFtsPhrase, String catalogName, String language, String
baseCatalogName, Int32 oid, CatalogSearchOptions searchOptions,
InventoryOptions inventoryOptions, JoinTableInformation jti, Boolean
recursive, Int32& totalRecords, String categoryClause, Object
isVirtualCatalog) +2424

[CatalogDatabaseException: Category search failed.]

Microsoft.CommerceServer.Catalog.Internal.Category.Search(CatalogExecutionContext
executionContext, String sqlClause, String ftsPhrase, String
advancedFtsPhrase, String catalogName, String language, String
baseCatalogName, Int32 oid, CatalogSearchOptions searchOptions,
InventoryOptions inventoryOptions, JoinTableInformation jti, Boolean
recursive, Int32& totalRecords, String categoryClause, Object
isVirtualCatalog) +2692

Microsoft.CommerceServer.Catalog.Internal.Category.Search(CatalogExecutionContext
executionContext, String sqlClause, String ftsPhrase, String
advancedFtsPhrase, String catalogName, String language, String
categoryName, CatalogSearchOptions searchOptions, InventoryOptions
inventoryOptions, JoinTableInformation jti, Boolean recursive, Int32&
totalRecords, String categoryClause) +385

Microsoft.CommerceServer.Catalog.Internal.CatalogSearch.Search(Int32&
totalRecords, Boolean returnTotalRecords) +1369

Microsoft.CommerceServer.Catalog.Internal.CatalogSearch.Search(Int32&
totalRecords) +39

Microsoft.CommerceServer.Catalog.Internal.CatalogServerContextBase.SearchWithCount(CatalogSearchParameters
catalogSearchParameters, CatalogSearchOptions searchOptions,
InventoryOptions inventoryOptions, JoinTableInformation
joinTableInformation, Int32& totalRecords) +207
   Microsoft.CommerceServer.Catalog.CatalogSearch.Search(Int32&
totalReco
 




 5 Posts in Topic:
Is it possible to sort products by DisplayName in a Virtual Cata
simon.grimes@[EMAIL PROTE  2006-09-09 00:58:03 
RE: Is it possible to sort products by DisplayName in a Virtual
sudharag@[EMAIL PROTECTED  2006-09-11 17:16:37 
Re: Is it possible to sort products by DisplayName in a Virtual
simon.grimes@[EMAIL PROTE  2006-09-12 00:09:14 
Re: Is it possible to sort products by DisplayName in a Virtual
simon.grimes@[EMAIL PROTE  2006-09-12 00:09:42 
Re: Is it possible to sort products by DisplayName in a Virtual
simon.grimes@[EMAIL PROTE  2006-09-12 05:08:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Nov 23 6:54:53 CST 2008.