
MySQL
First of all, gross, Visual Basic. If you are trying to write a script to do db backup, then you are going to either need to look for something open source or write it yourself. You can also just use
MySQL command line using the
MySQLdump command.
MySQLdump name_of_database > name_of_file.sql