|
-
Jun 8th, 2004, 07:07 AM
#1
Thread Starter
Hyperactive Member
copy database
How can I call mysqldump or mysqlhotcopy from vb.net code? thanks.
-
Jun 8th, 2004, 10:41 PM
#2
Lively Member
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
like this? if not, sorry...
-
Jun 9th, 2004, 08:13 AM
#3
Thread Starter
Hyperactive Member
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).
-
Jun 9th, 2004, 08:04 PM
#4
Lively Member
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...
-
Jun 10th, 2004, 06:21 AM
#5
Thread Starter
Hyperactive Member
don't be sorry. At least I learned a little about the Process object from you. Thank.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|