Ticket T1171312
Visible to All Users

How to specify which Connection Provider an application should use when creating a MySqlConnection manually

created 2 years ago (modified 2 years ago)

[DevExpress Support Team: CLONED FROM K18098: How to create a custom XPO connection provider and then use it in an XAF application]

Hi.
How should I tell XAF/XPO to use my connection provider if I set the connection using WinApplication's designer (dragging MySqlConnection from Toolbox) and not in App.config?
I cannot specify the XpoProvider there.
Thank you.
Regards.

Answers approved by DevExpress Support

created 2 years ago

Hello Ivan,

In this case, create an instance of your custom Connection Provider in code using its constructor. To do this in XAF, create a class that implements the IXpoDataStoreProvider interface and pass it to your application's Object Space Provider. Please refer to the following article for additional information: How to customize the underlying database provider options and data access behavior in XAF.

    Comments (1)

      Thank you, Anatol.
      Regards.

      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.