DDEX for VS2008 issue -11
<?
xml version="1.0" encoding="utf-8"?>
<DataObjectSupport xmlns="http://schemas.microsoft.com/VisualStudio/2007/07/Data/DataObjectSupport">
<Types>
<RootType>
<Properties>
<Property name="Server" type="System.String"/>
<Property name="Database" type="System.String" />
</Properties>
<Services>
<Service type="IVsDataObjectSelector" implementationType="Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetObjectSelector, Microsoft.VisualStudio.Data.Framework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Parameters method="SelectObjects">
<Parameter value="DATASOURCE" />
<Parameter>
<Parameter value="Server">
<Parameter value="SERVER" />
</Parameter>
<Parameter value="Database">
<Parameter value="DATABASE" />
</Parameter>
</Parameter>
</Parameters>
</Service >
</Services>
</RootType>
<Type name="StoredProcedure" preferredOrdering="Name">
<Identifier>
<Part name="Name" />
</Identifier>
<Properties>
<Property name="Name" isIdentifierPart="true" />
<Property name="Type" type="System.String" />
</Properties>
<Services>
<Service type="IVsDataObjectSelector" implementationType="Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetObjectSelector, Microsoft.VisualStudio.Data.Framework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Parameters method="SelectObjects">
<Parameter value="Procedures"/>
<Parameter>
<Parameter value="Name">
<Parameter value="OBJECT_NAME"/>
</Parameter>
<Parameter value="Type">
<Parameter value="OBJECT_TYPE"/>
</Parameter>
</Parameter>
</Parameters >
</Service>
<Service type="IDSRefBuilder"> Parameters method="AppendToDSRef"> Parameter> Parameter value="{2}" /> Parameter value="{1}" /> Parameter value="StoredProcedure" /> Parameter /> Parameter> Parameter value="39A5A7E7-513F-44a4-B79D-7652CD8962D9"> Parameter value="401" type="System.Int32" /> Parameter> Parameter> Parameter> Parameters> Service> Services> Type> Types> Mapped object types --> MappedTypes> MappedType name="StoredProcedure" underlyingType="StoredProcedure"> Selection restrictions="{Name}" /> Identifier> Part name="Name" underlyingMember="Name" /> Identifier> Properties> Property name="Name" isIdentifierPart="true" /> Property name="Type" underlyingMember="Type" /> Properties> MappedType> MappedTypes> DataObjectSupport>
When exdanf the storedprocedure node on the visual studio 2008 server exploder i get
"Failed to compare the two elemnts in array"
please let me know where i am doing wrong.
Thanks,
Rahul
All Replies
- hi, Rahul
Thanks for reporting this issue. Could you provide more detail info so that I can do the investigation?
It'll be helpful if you can send me your provider so that I can do debug.
Thanks,
Daniel
Daniel Hu (Microsoft) Hi Daniel
I am able to solve this issue.
I am facting one more issue the below code works fine in VS 2005 go generate UpdateCommand and deletecommand automatically we need to map Isprimary concept of TableUniqueKey
"Below is VS 2005 code and it works fine"
<Part name="Name" itemName="CONSTRAINT_NAME">
<Concepts>
<Concept name="Identifier3"/>
<Concept name="IsPrimary">
<Conversion>
<Calculate expr="true" type="System.Boolean"/>
</Conversion>
</Concept>
</Concepts>
</Part>
When I map the same thing in vS2008 Objsupport.xml file i get concet element is not supported.
Can you please let me know how to map IsPrimary concept in vs 2008.
Thansk,
Rahul- hi, Rahul
Following is a workable example for both VS2008 and VS2010. Could you try it out?<Part name="Index" itemName="INDEX_NAME">
<Concepts>
<Concept name="Identifier3"/>
<Concept name="Name" for="TableUniqueKey"/>
<Concept name="IsPrimary">
<Conversion>
<Calculate expr="true" type="System.Boolean"/>
</Conversion>
</Concept>
</Concepts>
</Part>
Thanks,
Daniel
Daniel Hu (Microsoft) - Hi Daniel
Below my code in Objectsupport.xml in vs 2008
<
MappedType name="TableUniqueKey" underlyingType="PrimaryKey">
<
Selection restrictions="{Table},{Name}" />
<
Identifier>
<
Part name="Table" underlyingMember="Table" />
<
Part name="Name" underlyingMember="Name" />
<
Concepts>
<Concept name="Identifier3"/>
<Concept name="IsPrimary">
<
Conversion>
<
Calculate expr="true" type="System.Boolean"/>
</
Conversion>
</
Concept>
</
Concepts>
</
Identifier>
<
Properties>
<
Property name="Name" isIdentifierPart="true" />
</
Properties>
</
MappedType>
The code which is in bold letters gives an error..its telling Invalid child element Concepts.
Is ther any other way to map the concepts.
Thanks,
Rahul - That's the format we used for oledbprovider in both VS2008/VS1010.
Is it possible for you to send me your provider so that I can take a deep look on your issue?
You can contact me @ danielhu@microsoft.com
Daniel Hu (Microsoft) - Hi,
Thanks for your reply.
Its not possible for me to send this project.
Can you please end me the just DataObjectSupport.xml and DataViewsupport.xml file?
This is mi id
I will have look in to your file
prashant.honavar@gmail.com
Thanks,
Prash - I sent you the sample xml for your reference.
I suggest to prepare a repro provider if you still have any issues.
Thanks,
Daniel
Daniel Hu (Microsoft) - Hi Daniel,
Thanks for sending the xml files.
I have one more issue..when I Drag n drop the table with PK on dataset the Tableadapter is not generating the
insertcommand automatically.
As per my understanding to generate Updatecommand and Deletecommand automatically we need to map the
isPrimaryKey concept.
I am not sure do we need to map any other concept to generate the Insertcommand.
Thanks,
Prash - Talk to Prash in email instead.
Daniel Hu (Microsoft)


