Muhammad Masood

Hi,
I am new to this forum, I am facing a problem when importing application definition file having "Comparison" filter descriptor, it raises following error:
"Application definition import failed. The following error occurred: The 'Type' attribute is invalid - The value 'Comparison' is invalid according to its datatype ' http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog:FilterDescriptorType' - The Enumeration constraint failed. Error was encountered at or just before Line: '61' and Position: '31'. "

One more thing is that I have configured an application, without any Comparison filterdescriptor, it works fine.... but I want to make the search in that application. when I configure Content Source, metadata property mapping and try to crawl it does not crawl and i am unable to make search.
The following is AdventureWorks Application definition xml:

< xml version="1.0" encoding="utf-8" standalone="yes" >
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Type="Database" Version="1.0.0.0" Name="AdventureWorksSample" xmlns=http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog>
<
Properties>
<
Property Name="WildcardCharacter" Type="System.String">%</Property>
</
Properties>
<
LobSystemInstances>
<
LobSystemInstance Name="AdventureWorksSampleInstance">
<
Properties>
<
Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>
<Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>
<Property Name="RdbConnection Data Source" Type="System.String">ITQAN-03</Property>
<Property Name="RdbConnection Initial Catalog" Type="System.String">AdventureWorks2000</Property>
<Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>
<
Property Name="RdbConnection Pooling" Type="System.String">false</Property>
</
Properties>
</
LobSystemInstance>
</
LobSystemInstances>
<
Entities>
<Entity EstimatedInstanceCount="10000" Name="Product">
<Properties>
<
Property Name="Title" Type="System.String">Name</Property>
</
Properties>
<
Identifiers>
<
Identifier Name="ProductID" TypeName="System.Int32" />
</
Identifiers>
<
Methods>
<Method Name="GetProducts">
<
Properties>
<
Property Name="RdbCommandText" Type="System.String">
SELECT ProductID, Name, ProductNumber, ListPrice FROM Product WHERE (ProductID &gt;= @MinProductID) AND (ProductID &lt;= @MaxProductID) AND (Name LIKE @Name) AND (ProductNumber LIKE @ProductNumber)
</Property>
<
Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>
</Properties>
<
FilterDescriptors>
<FilterDescriptor Type="Comparison" Name="ID" >
<
Properties>
<
Property Name="Comparator" Type="System.String">Equals</Property>
</
Properties>
</
FilterDescriptor>
<
FilterDescriptor Type="Wildcard" Name="Name">
<
Properties>
<
Property Name="UsedForDisambiguation" Type="System.Boolean">true</Property>
</
Properties>
</
FilterDescriptor>

<FilterDescriptor Type="Wildcard" Name="ProductNumber" />
</
FilterDescriptors>
<
Parameters>
<
Parameter Direction="In" Name="@MinProductID">
<
TypeDescriptor TypeName="System.Int32" IdentifierName="ProductID" AssociatedFilter="ID" Name="MinProductID">
<
DefaultValues>
<
DefaultValue MethodInstanceName="ProductFinderInstance" Type="System.Int32">0</DefaultValue>
</
DefaultValues>
</
TypeDescriptor>
</
Parameter>
<
Parameter Direction="In" Name="@MaxProductID">
<
TypeDescriptor TypeName="System.Int32" IdentifierName="ProductID" AssociatedFilter="ID" Name="MaxProductID">
<
DefaultValues>
<
DefaultValue MethodInstanceName="ProductFinderInstance" Type="System.Int32">99999999</DefaultValue>
</
DefaultValues>
</
TypeDescriptor>
</
Parameter>
<
Parameter Direction="In" Name="@Name">
<
TypeDescriptor TypeName="System.String" AssociatedFilter="Name" Name="Name">
<
DefaultValues>
<
DefaultValue MethodInstanceName="ProductFinderInstance" Type="System.String">%</DefaultValue>
<
DefaultValue MethodInstanceName="ProductSpecificFinderInstance" Type="System.String">%</DefaultValue>
</
DefaultValues>
</
TypeDescriptor>
</
Parameter>
<
Parameter Direction="In" Name="@ProductNumber">
<
TypeDescriptor TypeName="System.String" AssociatedFilter="ProductNumber" Name="ProductNumber">
<
DefaultValues>
<
DefaultValue MethodInstanceName="ProductFinderInstance" Type="System.String">%</DefaultValue>
<
DefaultValue MethodInstanceName="ProductSpecificFinderInstance" Type="System.String">%</DefaultValue>
</
DefaultValues>
</
TypeDescriptor>
</
Parameter>
<
Parameter Direction="Return" Name="Products">
<
TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="ProductDataReader">
<
TypeDescriptors>
<
TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="ProductDataRecord">
<
TypeDescriptors>
<
TypeDescriptor TypeName="System.Int32" IdentifierName="ProductID" Name="ProductID">
<
LocalizedDisplayNames>
<
LocalizedDisplayName LCID="1033">ID</LocalizedDisplayName>
</
LocalizedDisplayNames>
</
TypeDescriptor>
<
TypeDescriptor TypeName="System.String" Name="Name" >
<LocalizedDisplayNames>
<
LocalizedDisplayName LCID="1033">Name</LocalizedDisplayName>
</
LocalizedDisplayNames>
<
Properties>
<
Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
</
Properties>
</
TypeDescriptor>
<
TypeDescriptor TypeName="System.String" Name="ProductNumber">
<
LocalizedDisplayNames>
<
LocalizedDisplayName LCID="1033">Product Number</LocalizedDisplayName>
</
LocalizedDisplayNames>
<
Properties>
<
Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
</
Properties>
</
TypeDescriptor>
<
TypeDescriptor TypeName="System.Decimal" Name="ListPrice">
<
LocalizedDisplayNames>
<
LocalizedDisplayName LCID="1033">List Price</LocalizedDisplayName>
</
LocalizedDisplayNames>
</
TypeDescriptor>
</
TypeDescriptors>
</
TypeDescriptor>
</
TypeDescriptors>
</
TypeDescriptor>
</
Parameter>
</
Parameters>
<
MethodInstances>
<
MethodInstance Name="ProductFinderInstance" Type="Finder" ReturnParameterName="Products" />
<
MethodInstance Name="ProductSpecificFinderInstance" Type="SpecificFinder" ReturnParameterName="Products" />
</
MethodInstances>
</
Method>
</
Methods>
</Entity>
</
Entities>
</
LobSystem>




Re: SharePoint - Business Data Catalog Error when importing application definition file having Comparison FilterDescriptor

Nick Swan

Hi,

I pressume you are running on MOSS 2007 RTM and not one of the betas

Also to get search working you need to include an IdEnumerator method:

http://msdn2.microsoft.com/en-us/library/ms577629.aspx

Cheers

Nick






Re: SharePoint - Business Data Catalog Error when importing application definition file having Comparison FilterDescriptor

Muhammad Masood

Thanks Nick.

:)