Help with the example

Mar 11, 2015 at 8:48 PM
Edited Mar 11, 2015 at 8:50 PM
I try to use MySQLBackup with VB.net.
There is a line in the example like this:
mb.ExportToFile(file)
What is mb and how to declare?
In another thread I found:
Dim mb As MySqlBackup = New MySqlBackup(cmd)
By using this I get an error with (cmd). I suppose I have to import something.
For the MySQL connection I use
Imports MySql.Data.MySqlClient
works fine but how is the impots statement for MySqlBackup?
Pls give some help to a rookie.

Thanks & regards
Sven
Mar 13, 2015 at 4:37 PM
Can somebody pls post a piece of working code for VB.net.
I've desperately tried but couldn't get it running ...

Thanks & regards
Sven
Mar 16, 2015 at 1:02 PM
        Using conn As New MySqlConnection(connStr)
            Using cmd As New MySqlCommand()
                Using mb As New MySqlBackup(cmd)
                    cmd.Connection = conn
                    conn.Open()
                    mb.ExportToFile(fn)
                    conn.Close()
                End Using
            End Using
        End Using
Please look about the error message. My fault was that I have an other mysqldata.dll (.net connector) Version and the Version the mysqlbackup.net was compile with 6.9.5 .
Coordinator
Mar 17, 2015 at 1:20 AM
You can try to have a look at this thread:
http://mysqlbackupnet.codeplex.com/discussions/569544

The thread provided some working code in VB.NET.

It might provides you some hints.