看来我在这里遇到了一些困难,谷歌中的一些问题完全不适合我的问题。
my backup code:
mb.ExportToFile(" '" & Application.ExecutablePath & "'\backup.sql")
my restore code:
mb.ImportFromFile(" '" & Application.ExecutablePath & "'\backup.sql")
我希望我的备份始终位于我的 exe 文件或其附近。我认为这是可能的。
it says: "The given path's format is not supported."
最佳答案
.ExecutablePath
方法还返回可执行文件名称...您需要使用这个:
mb.ExportToFile(System.IO.Path.GetDirectoryName(Application.ExecutablePath) & "\backup.sql")
关于mysql - 创建备份和恢复所在vb.net中的可执行路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30870549/