Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views aren't be exported #102

Open
aarhor opened this issue Apr 4, 2023 · 2 comments
Open

Views aren't be exported #102

aarhor opened this issue Apr 4, 2023 · 2 comments

Comments

@aarhor
Copy link

aarhor commented Apr 4, 2023

I want to use this Library in my Project (.NET 7). It works fine, but there aren't any views in the sql file.
For the Backup I use the following code:

public static bool Create_DB_Backup(string Destination)
    {
       try
        {
            using (MySqlConnection conn = new MySqlConnection(Connectionstring()))
            {
               using (MySqlCommand cmd = new MySqlCommand())
                {
                    using (MySqlBackup mb = new MySqlBackup(cmd))
                    {
                        cmd.Connection = conn;
                        conn.Open();
                        mb.ExportInfo.ExportViews = true;
                        mb.ExportToFile(Destination);
                        conn.Close();
                    }
                }
            }
            return true;
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message.ToString());
            return false;
        }
    }
@aarhor aarhor changed the title Views aren't bei exported Views aren't be exported Apr 8, 2023
@adriancs2
Copy link
Member

Your code appears to be correct. I'm not able to recreate the error that you've mentioned. Perhaps, you error is related to something else.

@aarhor
Copy link
Author

aarhor commented May 25, 2023

Hello,
Thanks for the answer. I'll have a look into it. Maybe something has changed in my project since my original post...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants