I'm trying to backup my sql database. I try use this first
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Process.Start("C:\Users\user\Desktop\Thesis\BACKUP feb 15\capstone_real\capstone_real\Resources\mysqldump.exe", " -u root -padmin capstone -r ""C:\Users\user\Desktop\Thesis\backup1.sql""")
End Sub
it works.. but I didn't want to specified the directory like this so try this
Process.Start(" " & Application.StartupPath & "\Resources\mysqldump.exe, -u root -padmin capstone -r ""C:\Users\user\Desktop\Thesis\backup2.sql""")
Didn't work (The system cannot find the file specified)
Points to Note
Application.StartupPath
returns path like C:\\ xyz derectories\\bin\\debug
debug
folder contains required Directory Application.StartupPath
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.