2 Replies - 4686 Views - Last Post: 21 October 2009 - 05:40 AM Rate Topic: -----

#1 jojonecio  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 07-March 09

How to backup and restore Mysql database in VB6

Posted 14 October 2009 - 06:19 PM

:blink:

i tried to make a backup of my database in Mysql.

i have these lines of code.
	Dim strCommand As String
	Dim strAppPath As String
	
	Screen.MousePointer = vbHourglass
	
	strAppPath = App.Path & IIf(Right(App.Path, 1) = "\", "", "\")
	
  strCommand = strAppPath & "mysqldump --host=hostIP --port=portNum -u uName --password=pword --all-databases --opt -c > d:\Path\To\Backup\Folder\BAKUP_FILE.SQL"
	
	ShellExecute 0, vbNullString, strBackup, vbNullString, vbNullString, vbNormalFocus
	
	Screen.MousePointer = vbDefault




when i run it a Sub or Function not defined Error, referencing to ShellExecute, will be displayed. What is this ShellExecute by the way? Is my code above correct?

Is This A Good Question/Topic? 0
  • +

Replies To: How to backup and restore Mysql database in VB6

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: How to backup and restore Mysql database in VB6

Posted 15 October 2009 - 08:05 AM

ShellExecute is an API that you can find under Add-Ins in VB's IDE Menu. If you do not see API Viewer, select Add-In Manager, select VB 6 API Viewer, and in lower right corner select Loaded/Unloaded. OK.

Add-Ins>API Viewer
When it appears>File>Load Text File>Win32API.txt

Press F1 to read all about it in help



Good Luck
Was This Post Helpful? 0
  • +
  • -

#3 jojonecio  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 07-March 09

Re: How to backup and restore Mysql database in VB6

Posted 21 October 2009 - 05:40 AM

View Postvb5prgrmr, on 15 Oct, 2009 - 07:05 AM, said:

ShellExecute is an API that you can find under Add-Ins in VB's IDE Menu. If you do not see API Viewer, select Add-In Manager, select VB 6 API Viewer, and in lower right corner select Loaded/Unloaded. OK.

Add-Ins>API Viewer
When it appears>File>Load Text File>Win32API.txt

Press F1 to read all about it in help



Good Luck


Thank you so much for your enlightenment. I already solved the issue using SQLs and text file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1