none
[HELP] Cant make MySql Database Backup on a random folder. RRS feed

  • Question

  • Hi all.



    My problem is that i cant make my app, make a MySql Database back up on a random folder:


    Works:

    Code Snippet

    string bup = "BACKUP TABLE accounts, names TO 'C:/BackUp'";
                MySqlCommand cmd = new MySqlCommand(bup, conn);
                cmd.ExecuteNonQuery();

    This works but is a folder coded in the app, you cant change the directory.
    (and the users hate making folders in there C: Drive)



    Dosent Work:

    Code Snippet

    string bup = "BACKUP TABLE accounts, names TO '"+Settings.Default.Directory+"'";
                MySqlCommand cmd = new MySqlCommand(bup, conn);
                cmd.ExecuteNonQuery();

    Thats using a Setting file (Settings.Settings)


    OR

    Code Snippet

    String D;
    string bup = "BACKUP TABLE accounts, names TO '"+D+"'";
                MySqlCommand cmd = new MySqlCommand(bup, conn);
                cmd.ExecuteNonQuery();


    How can i make my app to use any directory that the user selects to make back ups?



    Alot of thanks in advance

    Friday, September 7, 2007 12:03 AM