Bug Report T293489
Visible to All Users

Data Access Library - It is not possible to set a relation for columns of different types even if it is possible to convert such types on the database engine side

created 9 years ago

I'm creating a Mail Merge Template Spread sheet.

After creating the two queries I need to setup the relationship.

Using the Master-Detail Relation Editor (Manage Relations Button) I setup to my two fields from the two different tables.

When I click OK I receive the following error:

Cannot set relation between columns XXXX of type sytem.Int32 and YYYY of type system.UInt32.

I understand they of different column types but they really only contain integer values.  When I run this type of join in normal sql statement  our database engine does not complain about it.  You should be able to setup relationships with mix matched column types Int16, Int32, Int64 and UInt… ect.  Let the DB engine decided if there is a problem, most the times it does not care, its looking at it as a value, not a column type.

My recommendation would be for you to remove this error preventing me and my users to continue with the Join.  Let the database engine reject it if necessary.  It's ok for it warn me, but not ok to prevent it from continuing, because as it stands now I cannot use it.

Thanks

Comments (1)
Dmitry Tokmachev (DevExpress) 9 years ago

    Hi Mike,

    Thank you for the detailed description.

    That exception is thrown by our source code and having examined your thoughts, I wouldn't say that I'm not agree with your point of view. It seems that it's worth displaying a warning message in such situations rather than throwing an exception and preventing the SqlDataSource from being filled with data at all, in case it is possible to convert, for example, the aforementioned column types to each other.

    I have passed this thread to our R&D team to determine if we can improve this situation and implement the changes in the suggested way. Please stay tuned for further updates in this thread and thank you for your cooperation.

    Answers approved by DevExpress Support

    created 9 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.