Current filter:
                                You should refresh the page.
                                Support Center
                                  • It looks like XPO supports the MySql database, but I can't find any information on how to use MySql with XPO.

                                1 Solution

                                Creation Date Importance Sort by

                                XPO 1.7 supports a lot of different database servers. Below is a list of the available XPO adapters and the corresponding provider assemblies they require. The adapter assembly name contains the server name it supports. For example,
                                DevExpress.Xpo.Advantage supports the Advantage database,
                                DevExpress.Xpo.Ase supports Sybase, and so on.

                                DevExpress.Xpo.Advantage - Advantage.Data.Provider 7.10.0
                                DevExpress.Xpo.Asa - iAnywhere.Data.AsaClient 9.0.2
                                DevExpress.Xpo.Ase - Sybase.Data.AseClient 1.1.327
                                DevExpress.Xpo.DB2 - IBM.Data.DB2 8.1.2
                                DevExpress.Xpo.Firebird - FirebirdSql.Data.Firebird
                                DevExpress.Xpo.MySql - MySql.Data 1.0.7
                                DevExpress.Xpo.Oracle - System.Data.OracleClient 1.0.5000
                                DevExpress.Xpo.PervasiveSql - Pervasive.Data.SqlClient
                                DevExpress.Xpo.PostgreSql - Npgsql 0.7.0
                                DevExpress.Xpo.VistaDB - VistaDB.Provider 2.11.18

                                To make XPO use your database server, you should do the following:
                                1. Add a pair of assemblies which correspond to your server from the list above to your project's References.
                                2. Generate a connection string using the GetConnectionString function of the appropriate ConnectionProvider class from the DevExpress.Xpo.DB namespace.
                                3. Assign the generated connection string to Session.DefaultSession.ConnectionString.
                                4. Use the same string for all XPO Session objects in your project.

                                The XPO connection string differs from a pure database connection string - it includes the database server name to distinguish strings for different databases. Therefore, you should either use our providers' GetConnectionString method to generate a connection string or assign an existing Connection component of your provider (e.g. SqlConnection to work with MS SQL Server) to the Connection property of the DevExpress.Xpo.Session.

                                Let's consider MySql as an example. You should add the DevExpress.Xpo.MySql and MySql.Data assemblies to your project's References. Then you can use the following code to create a connection to your MySql database:


                                static void Main() { string conn = DevExpress.Xpo.DB.MySqlConnectionProvider.GetConnectionString("DBSERVER", "user", "pwd", "MyApp"); DevExpress.Xpo.Session.DefaultSession.ConnectionString = conn; Application.Run(new MainForm()); }

                                See Also:
                                Database Systems Supported by XPO in XPO documentation
                                Connection string formats of different database servers
                                How to read the database connection from an application configuration file
                                How to use MS SQL Server instead of MS Access as a persistent storage
                                How to create a correct connection string for XPO providers?

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2018 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners