How can I call mysqldump or mysqlhotcopy from vb.net code? thanks.
Printable View
How can I call mysqldump or mysqlhotcopy from vb.net code? thanks.
like this? if not, sorry...VB Code:
Module Module1 Sub Main() Try Dim p As New Process() p.StartInfo.FileName = "mysqldump" p.StartInfo.WorkingDirectory = "d:\mysql\bin" p.StartInfo.Arguments = "--user=root personnel" p.Start() Catch ex As Exception Console.WriteLine(ex.Message) End Try End Sub End Module
thank you. that is something i am looking for. Could you give me sample code to pass argument to musqldump, what I want to do is pass a selected db and dump it to a new file, something like mysqldump(from, to).
to tell you the truth, i don't know much about mysql. i just use the process object since you want to run a process from mysql directory. i'm so sorry...
all i can suggest is for you to know the arguments you need and put it in the .arguments of your process. again, sorry...
don't be sorry. At least I learned a little about the Process object from you. Thank. :wave: