Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: LoadLibraryW(dllpath) fails Pin
Pete O'Hanlon14-Mar-12 1:57
mvePete O'Hanlon14-Mar-12 1:57 
GeneralRe: LoadLibraryW(dllpath) fails Pin
Dave Kreskowiak14-Mar-12 3:21
mveDave Kreskowiak14-Mar-12 3:21 
AnswerRe: LoadLibraryW(dllpath) fails Pin
Richard MacCutchan14-Mar-12 3:24
mveRichard MacCutchan14-Mar-12 3:24 
GeneralRe: LoadLibraryW(dllpath) fails Pin
V K 214-Mar-12 3:32
V K 214-Mar-12 3:32 
GeneralRe: LoadLibraryW(dllpath) fails Pin
Pete O'Hanlon14-Mar-12 4:00
mvePete O'Hanlon14-Mar-12 4:00 
Questionhow to create regular expresion for this example in c# window application Pin
jiya 214-Mar-12 0:19
jiya 214-Mar-12 0:19 
AnswerRe: how to create regular expresion for this example in c# window application Pin
Pete O'Hanlon14-Mar-12 0:52
mvePete O'Hanlon14-Mar-12 0:52 
Questionbackup mysql database using c# Pin
altafmohd13-Mar-12 19:28
altafmohd13-Mar-12 19:28 
i m providing code which i am running and getting exception plz help in this regard thanx .... Smile | :)




public void Backup()
{
// Process.Start("IExplore.exe");
try
{
DateTime Time = DateTime.Now;
int year = Time.Year;
int month = Time.Month;
int day = Time.Day;
int hour = Time.Hour;
int minute = Time.Minute;
int second = Time.Second;
int millisecond = Time.Millisecond;

//Save file to C:\ with the current date as a filename
string path;
path = "C:\\MySqlBackup" + year + "-" + month + "-" + day +
"-" + hour + "-" + minute + "-" + second + "-" + millisecond + ".sql";
StreamWriter file = new StreamWriter(path);


ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "mysqldump";
psi.RedirectStandardInput = false;
psi.RedirectStandardOutput = true;
psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}",
"root","123456","localhost","userdb");
psi.UseShellExecute = false;

Process process = Process.Start(psi); ///here is exception coming

string output;
output = process.StandardOutput.ReadToEnd();
file.WriteLine(output);
process.WaitForExit();
file.Close();
process.Close();
}
catch (IOException ex)
{
MessageBox.Show("Error , unable to backup!");
}
}





but when i run this code it is providing me runtime eroor exception ........".The system cannot find the file specified " at the line
Process process = Process.Start(psi);
AnswerRe: backup mysql database using c# Pin
Wayne Gaylard13-Mar-12 19:43
professionalWayne Gaylard13-Mar-12 19:43 
GeneralRe: backup mysql database using c# Pin
altafmohd13-Mar-12 20:31
altafmohd13-Mar-12 20:31 
GeneralRe: backup mysql database using c# Pin
Wayne Gaylard13-Mar-12 20:37
professionalWayne Gaylard13-Mar-12 20:37 
GeneralRe: backup mysql database using c# Pin
altafmohd13-Mar-12 21:36
altafmohd13-Mar-12 21:36 
GeneralRe: backup mysql database using c# Pin
Pete O'Hanlon13-Mar-12 22:50
mvePete O'Hanlon13-Mar-12 22:50 
GeneralRe: backup mysql database using c# Pin
altafmohd13-Mar-12 23:19
altafmohd13-Mar-12 23:19 
GeneralRe: backup mysql database using c# Pin
altafmohd14-Mar-12 8:42
altafmohd14-Mar-12 8:42 
AnswerRe: backup mysql database using c# Pin
Wayne Gaylard14-Mar-12 20:07
professionalWayne Gaylard14-Mar-12 20:07 
GeneralRe: backup mysql database using c# Pin
altafmohd14-Mar-12 21:01
altafmohd14-Mar-12 21:01 
AnswerRe: backup mysql database using c# Pin
Abhinav S13-Mar-12 20:00
Abhinav S13-Mar-12 20:00 
GeneralRe: backup mysql database using c# Pin
altafmohd13-Mar-12 21:43
altafmohd13-Mar-12 21:43 
GeneralRe: backup mysql database using c# Pin
Abhinav S13-Mar-12 23:47
Abhinav S13-Mar-12 23:47 
GeneralRe: backup mysql database using c# Pin
altafmohd14-Mar-12 0:00
altafmohd14-Mar-12 0:00 
GeneralRe: backup mysql database using c# Pin
altafmohd14-Mar-12 19:04
altafmohd14-Mar-12 19:04 
AnswerRe: backup mysql database using c# Pin
PIEBALDconsult14-Mar-12 5:26
mvePIEBALDconsult14-Mar-12 5:26 
QuestionDelphi to C# Pin
firepile13-Mar-12 11:02
firepile13-Mar-12 11:02 
AnswerRe: Delphi to C# Pin
Philippe Mori13-Mar-12 16:17
Philippe Mori13-Mar-12 16:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.