0

I am hit with a mysterious win32exception here when i was attempting to do a mysqldump(backup) to backup my database on a windows form , .Net Framework 4.0, Visual Studio 2010 on a x64 Windows 8.0 machine.

All went fine except for this process where it crashes mysteriously where they said that the system cannot find the file specified.

Any direction on how I can solve this? Thanks!

The place where I was hit with an error

Guo Hong Lim
  • 1,690
  • 3
  • 13
  • 20

1 Answers1

2

You are using UseShellExecute=false. In this context, the MSDN specifies that the FileName property should be a fully qualified path to the executable. So, just writing mysqldump.exe as the filename is not enough to start the process.

I recommend to set also the WorkingDirectory to the path where the mysql binaries are installed because, if the process launched needs some local installed resources, withoud a WorkingDirectory set you could have hard times to understand errors about files not found or missing configuration files.

Steve
  • 213,761
  • 22
  • 232
  • 286
  • Surely there are four options and option #1 is specify the full path of `mysqldump.exe` ? – ta.speot.is Mar 09 '14 at 08:56
  • @ta.speot.is you have a point here. Initially I thought that specofying a full path for mysqldump was not a good idea, but then I noticed the UseShellExecute=false and this change everything. – Steve Mar 09 '14 at 09:32