dazinator / CrmAdo.Ddex

A Visual Studio Extension that allows you to connect to Dynamics CRM 2011 & 2013 instances from Server Explorer. The technical visual studio term is "Data Designer Extensibility". See entities, attributes, plugins etc.
Other
2 stars 1 forks source link

Get the "New Query" menu command and VS Query Designer working #5

Open dazinator opened 9 years ago

dazinator commented 9 years ago

When you add a connection using server explorer, you can right click on the root node and click the "New Query" menu command.

On a table node, you can click the "Get Data" men command.

Both of these don't work properly!

GET THEM TO WORK!!!! :)

dazinator commented 9 years ago

This might be because in order to support the designer, certain column "properties" need to be specified. Currently they are not, so if you select a column in the query designer, for example, the properties windows shows:

image

They all appear to be just default values at the moment.

dazinator commented 9 years ago

Need to implement the following schema collections in CrmObjectSelector

    <!--
            Defines a type that represents an index.
        -->
        <Type name="Index" preferredOrdering="Database, Schema, Table, Name">
            <Identifier>
                <Part name="Database" />
                <Part name="Schema" />
                <Part name="Table" />
                <Part name="Name" />
            </Identifier>
            <Properties>
                <Property name="Name" isIdentifierPart="true" />
                <Property name="IsUnique" type="System.Boolean" />
                <Property name="IsPrimary" type="System.Boolean" />
            </Properties>
            <Services>
                <Service type="IVsDataObjectSelector" />
                <Service type="IDSRefBuilder">
                    <Parameters method="AppendToDSRef">
                        <Parameter>
                            <Parameter value="{2}" />
                            <Parameter value="{1}" />
                            <Parameter value="Table" />
                            <Parameter />
                            <Parameter>
                                <!-- GUID_DSRefProperty_PreciseType -->
                                <Parameter value="39A5A7E7-513F-44a4-B79D-7652CD8962D9">
                                    <Parameter value="101" type="System.Int32" /> <!-- Table -->
                                </Parameter>
                            </Parameter>
                            <Parameter>
                                <Parameter>
                                    <Parameter value="{3}" />
                                    <Parameter />
                                    <Parameter value="Index" />
                                </Parameter>
                            </Parameter>
                        </Parameter>
                    </Parameters>
                </Service>
            </Services>
        </Type>
        <!--
            Defines a type that represents an index column.
        -->
        <Type name="IndexColumn" preferredOrdering="Database, Schema, Table, Index, Ordinal">
            <Identifier>
                <Part name="Database" />
                <Part name="Schema" />
                <Part name="Table" />
                <Part name="Index" />
                <Part name="Name" />
            </Identifier>
            <Properties>
                <Property name="Name" isIdentifierPart="true" />
                <Property name="Ordinal" type="System.Byte" />
            </Properties>
            <Services>
                <Service type="IVsDataObjectSelector" />
                <Service type="IDSRefBuilder">
                    <Parameters method="AppendToDSRef">
                        <Parameter>
                            <Parameter value="{2}" />
                            <Parameter value="{1}" />
                            <Parameter value="Table" />
                            <Parameter />
                            <Parameter>
                                <!-- GUID_DSRefProperty_PreciseType -->
                                <Parameter value="39A5A7E7-513F-44a4-B79D-7652CD8962D9">
                                    <Parameter value="101" type="System.Int32" /> <!-- Table -->
                                </Parameter>
                            </Parameter>
                            <Parameter>
                                <Parameter>
                                    <Parameter value="{3}" />
                                    <Parameter />
                                    <Parameter value="Index" />
                                    <Parameter />
                                    <Parameter />
                                    <Parameter>
                                        <Parameter>
                                            <Parameter value="{4}" />
                                            <Parameter />
                                            <Parameter value="Field" />
                                        </Parameter>
                                    </Parameter>
                                </Parameter>
                            </Parameter>
                        </Parameter>
                    </Parameters>
                </Service>
            </Services>
        </Type>
        <!--
            Defines a type that represents a foreign key.
        -->
        <Type name="ForeignKey" preferredOrdering="Database, Schema, Table, Name">
            <Identifier>
                <Part name="Database" />
                <Part name="Schema" />
                <Part name="Table" />
                <Part name="Name" />
            </Identifier>
            <Properties>
                <Property name="Name" isIdentifierPart="true" />
                <Property name="ReferencedTableSchema" />
                <Property name="ReferencedTableName" />
                <Property name="UpdateAction" type="System.Byte" />
                <Property name="DeleteAction" type="System.Byte" />
            </Properties>
            <Services>
                <Service type="IVsDataObjectSelector" />
            </Services>
        </Type>
        <!--
            Defines a type that represents a foreign key column.
        -->
        <Type name="ForeignKeyColumn" preferredOrdering="Database, Schema, Table, ForeignKey, Ordinal">
            <Identifier>
                <Part name="Database" />
                <Part name="Schema" />
                <Part name="Table" />
                <Part name="ForeignKey" />
                <Part name="Name" />
            </Identifier>
            <Properties>
                <Property name="Name" isIdentifierPart="true" />
                <Property name="Ordinal" type="System.Int32" />
                <Property name="ReferencedColumnName" />
            </Properties>
            <Services>
                <Service type="IVsDataObjectSelector" />
            </Services>
        </Type>