From: samy.3d on
Hi,

I am getting the following error when i am trying to create a BDC
entity with two identifiers: int32 and string type. It is working
fine if i create an entity with two identifiers of the same type. The
problem is only with the entities with different type of identifiers.
It is working fine if i remove the "IdentifierName="strkey"' from the
typedescriptor of the @strkey parameter (but i am not sure if i can
remove that).

ERROR:
"Microsoft.Office.Server.ApplicationRegistry.MetadataModel.MetadataException:
Could not find fields to insert all the Identifier Values to correctly
execute a SpecificFinder MethodInstance with Name
'tempDBentitySpecificFinder'. Ensure input Parameters have
TypeDescriptors associated with every Identifier defined for this
Entity."

APPLICATION DEFINITION:
<Entity EstimatedInstanceCount="10000" Name="tempentity">
<Identifiers>
<Identifier TypeName="System.Int32" Name="intkey" />
<Identifier TypeName="System.String" Name="strkey" />
</Identifiers>
<Methods>
<Method Name="tempDBmethod">
<Properties>
<Property Name="RdbCommandType"
Type="System.Data.CommandType, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
<Property Name="RdbCommandText"
Type="System.String">SELECT strkey, intkey FROM dbo.tempDB WHERE
(strkey LIKE @strkey) AND (intkey &gt;= @GeneratedMinintkey) AND
(intkey &lt;= @GeneratedMaxintkey) </Property>
</Properties>

<FilterDescriptors>
<FilterDescriptor Type="Wildcard" Name="strkey"/>
<FilterDescriptor Type="Comparison" Name="intkey"/>
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" Name="@strkey">
<TypeDescriptor TypeName="System.String"
IdentifierName="strkey" AssociatedFilter="strkey" Name="strkey">
<DefaultValues>
<DefaultValue
MethodInstanceName="tempDBentityFinder" Type="System.String">%</
DefaultValue>
<DefaultValue
MethodInstanceName="tempDBentitySpecificFinder" Type="System.String">
%</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>

<Parameter Direction="In" Name="@GeneratedMinintkey">
<TypeDescriptor TypeName="System.Int32"
IdentifierName="intkey" AssociatedFilter="intkey" Name="intkey">
<DefaultValues>
<DefaultValue
MethodInstanceName="tempDBentityFinder" Type="System.Int32">0</
DefaultValue>
<DefaultValue
MethodInstanceName="tempDBentitySpecificFinder" Type="System.Int32">0</
DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>
<Parameter Direction="In" Name="@GeneratedMaxintkey">
<TypeDescriptor TypeName="System.Int32"
IdentifierName="intkey" AssociatedFilter="intkey" Name="intkey">
<DefaultValues>
<DefaultValue
MethodInstanceName="tempDBentityFinder" Type="System.Int32">9999999</
DefaultValue>
<DefaultValue
MethodInstanceName="tempDBentitySpecificFinder"
Type="System.Int32">9999999</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>
<Parameter Direction="Return"
TypeReflectorTypeName="Microsoft.Office.Server.ApplicationRegistry.Infrastructure.DotNetTypeReflector"
Name="tempDBs">
<TypeDescriptor TypeName="System.Data.IDataReader,
System.Data, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" IsCollection="true"
Name="tempDBDataReader">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Data.IDataRecord,
System.Data, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" Name="tempDBDataRecord">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String"
IdentifierName="strkey" Name="strkey" />
<TypeDescriptor TypeName="System.Int32"
IdentifierName="intkey" Name="intkey" />

</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder"
ReturnParameterName="tempDBs"
ReturnTypeDescriptorName="tempDBDataReader"
ReturnTypeDescriptorLevel="0" Name="tempDBentityFinder">

</MethodInstance>
<MethodInstance Type="SpecificFinder"
ReturnParameterName="tempDBs"
ReturnTypeDescriptorName="tempDBDataReader"
ReturnTypeDescriptorLevel="0" Name="tempDBentitySpecificFinder">

</MethodInstance>
</MethodInstances>
</Method>
</Methods>
</Entity>


Any help in this issue is really appreciated.

Thanks,
Sammy.

From: samy.3d on
Never mind....apparently, it works if system.string type (implicit
type casting) is used for both the identifiers (eventhough one of the
identifiers is an int).

On Feb 5, 9:49 pm, samy...(a)gmail.com wrote:
> Hi,
>
> I am getting the following error when i am trying to create a BDC
> entity with two identifiers: int32 and string type. It is working
> fine if i create an entity with two identifiers of the same type. The
> problem is only with the entities with different type of identifiers.
> It is working fine if i remove the "IdentifierName="strkey"' from the
> typedescriptor of the @strkey parameter (but i am not sure if i can
> remove that).
>
> ERROR:
> "Microsoft.Office.Server.ApplicationRegistry.MetadataModel.MetadataException:
> Could not find fields to insert all the Identifier Values to correctly
> execute a SpecificFinder MethodInstance with Name
> 'tempDBentitySpecificFinder'. Ensure input Parameters have
> TypeDescriptors associated with every Identifier defined for this
> Entity."
>
> APPLICATION DEFINITION:
> <Entity EstimatedInstanceCount="10000" Name="tempentity">
> <Identifiers>
> <Identifier TypeName="System.Int32" Name="intkey" />
> <Identifier TypeName="System.String" Name="strkey" />
> </Identifiers>
> <Methods>
> <Method Name="tempDBmethod">
> <Properties>
> <Property Name="RdbCommandType"
> Type="System.Data.CommandType, System.Data, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
> <Property Name="RdbCommandText"
> Type="System.String">SELECT strkey, intkey FROM dbo.tempDB WHERE
> (strkey LIKE @strkey) AND (intkey &gt;= @GeneratedMinintkey) AND
> (intkey &lt;= @GeneratedMaxintkey) </Property>
> </Properties>
>
> <FilterDescriptors>
> <FilterDescriptor Type="Wildcard" Name="strkey"/>
> <FilterDescriptor Type="Comparison" Name="intkey"/>
> </FilterDescriptors>
> <Parameters>
> <Parameter Direction="In" Name="@strkey">
> <TypeDescriptor TypeName="System.String"
> IdentifierName="strkey" AssociatedFilter="strkey" Name="strkey">
> <DefaultValues>
> <DefaultValue
> MethodInstanceName="tempDBentityFinder" Type="System.String">%</
> DefaultValue>
> <DefaultValue
> MethodInstanceName="tempDBentitySpecificFinder" Type="System.String">
> %</DefaultValue>
> </DefaultValues>
> </TypeDescriptor>
> </Parameter>
>
> <Parameter Direction="In" Name="@GeneratedMinintkey">
> <TypeDescriptor TypeName="System.Int32"
> IdentifierName="intkey" AssociatedFilter="intkey" Name="intkey">
> <DefaultValues>
> <DefaultValue
> MethodInstanceName="tempDBentityFinder" Type="System.Int32">0</
> DefaultValue>
> <DefaultValue
> MethodInstanceName="tempDBentitySpecificFinder" Type="System.Int32">0</
> DefaultValue>
> </DefaultValues>
> </TypeDescriptor>
> </Parameter>
> <Parameter Direction="In" Name="@GeneratedMaxintkey">
> <TypeDescriptor TypeName="System.Int32"
> IdentifierName="intkey" AssociatedFilter="intkey" Name="intkey">
> <DefaultValues>
> <DefaultValue
> MethodInstanceName="tempDBentityFinder" Type="System.Int32">9999999</
> DefaultValue>
> <DefaultValue
> MethodInstanceName="tempDBentitySpecificFinder"
> Type="System.Int32">9999999</DefaultValue>
> </DefaultValues>
> </TypeDescriptor>
> </Parameter>
> <Parameter Direction="Return"
> TypeReflectorTypeName="Microsoft.Office.Server.ApplicationRegistry.Infrastructure.DotNetTypeReflector"
> Name="tempDBs">
> <TypeDescriptor TypeName="System.Data.IDataReader,
> System.Data, Version=2.0.3600.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089" IsCollection="true"
> Name="tempDBDataReader">
> <TypeDescriptors>
> <TypeDescriptor TypeName="System.Data.IDataRecord,
> System.Data, Version=2.0.3600.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089" Name="tempDBDataRecord">
> <TypeDescriptors>
> <TypeDescriptor TypeName="System.String"
> IdentifierName="strkey" Name="strkey" />
> <TypeDescriptor TypeName="System.Int32"
> IdentifierName="intkey" Name="intkey" />
>
> </TypeDescriptors>
> </TypeDescriptor>
> </TypeDescriptors>
> </TypeDescriptor>
> </Parameter>
> </Parameters>
> <MethodInstances>
> <MethodInstance Type="Finder"
> ReturnParameterName="tempDBs"
> ReturnTypeDescriptorName="tempDBDataReader"
> ReturnTypeDescriptorLevel="0" Name="tempDBentityFinder">
>
> </MethodInstance>
> <MethodInstance Type="SpecificFinder"
> ReturnParameterName="tempDBs"
> ReturnTypeDescriptorName="tempDBDataReader"
> ReturnTypeDescriptorLevel="0" Name="tempDBentitySpecificFinder">
>
> </MethodInstance>
> </MethodInstances>
> </Method>
> </Methods>
> </Entity>
>
> Any help in this issue is really appreciated.
>
> Thanks,
> Sammy.

Never mind.