Mysql DUMP COMMAND in VB.NET

Asked

Viewed 35 times

1

Folks good night I need to give this command in VB.NET SHELL but I’m not able to do it I already tried 3 hours I read a lot of things and I can’t think outside the box .

Shell("CMD.exe /c cd \ & cd Program Files & cd MAPS & cd SERVER MANAGER & cd mysql & cd bin & mysqldump --user=root --password=x maps.controller > "C:\Program Files\MAPS\SERVER MANAGER\mysql\dumped\1.sql" ", AppWinStyle.Hide = 1)

He is in error when programming I have to think of something different but I can’t get someone to have a light there , I tried to put via string naming STRING outside and pulling in but at the time of the command mysqldump it needs to be read exactly like this in [DOS] .

mysqldump --user=root --password=x maps.controller > "C:\Program Files\MAPS\SERVER MANAGER\mysql\dumped\1.sql"

in DOS this command is perfect inside VB.NET that I can’t put .


in VB.NET is like this to create; but it creates in a location that I do not want that is the root folder of mysqldump.exe :

Private Sub BackupMAPSCONTROLLERDBToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BackupMAPSCONTROLLERDBToolStripMenuItem.Click
    Dim ano, mes, dia As Integer
    Dim data_corrente As Date
    Dim data_corrente_saida As String

    data_corrente = dtp1.Value
    dia = data_corrente.Day
    mes = data_corrente.Month
    ano = data_corrente.Year
    data_corrente_saida = dia & "-" & mes & "-" & ano

    Shell("CMD.exe /c cd \ & cd Program Files & cd MAPS & cd SERVER MANAGER & cd mysql & cd bin & mysqldump --user=root --password=x maps.controller > " & "MAPS_CONTROLLER-" & data_corrente_saida & ".sql", AppWinStyle.Hide = 1)
End Sub
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.