Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb + mysql: help with mysqldump

Status
Not open for further replies.

mastertorr

Programmer
Dec 21, 2006
36
CA
Sorry if this is in the wrong forum, I wasnt sure if it was vb or mysql

Does anyone have any documentation or would be willingly to provide some assistance in how to open mysqldump.exe within vb6 and set the parameters it requests so that i can back up my sql database?

Basically, someone would click a backup button or whatnot, and it would save the sql to a .sql file.

I've tried something along these lines (found here: Dim strBackup As String
Dim strAppPath As String

strAppPath = App.Path & IIf(Right(App.Path, 1) = "\", "", "\")

strBackup = strAppPath & "mysqldump --host=localhost -u root --proot --all-databas --opt -c > c:\Path\To\Backup\Folder\BACKUP_FILE.SQL"

ShellExecute 0, vbNullString, strBackup, vbNullString, vbNullString, vbNormalFocus

and yes, the mysqldump.exe is in the same folder as strAppPath.But when i execute this i get a newly created folder, with no .sql file.

Any assistance would be greatly appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top