restore
-
BasePriority = 'process.BasePriority' threw an exception of type 'System.InvalidOperationException'...This is the exception I am getting while restoring the database from my .net application..Here I am providing the code....
try
{
//Read file from C:\
string path;
path = filetext.Text;
StreamReader file = new StreamReader(path);
string input = file.ReadToEnd();
file.Close();ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = @"C:\\Program Files (x86)\\MySQL\\MySQL Server 5.0\\bin\\mysqlimport.exe"; psi.RedirectStandardInput = true; psi.RedirectStandardOutput = false; psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}", userid, paswd, server, comboBox1.Text); psi.UseShellExecute = false; Console.WriteLine(psi); Process process = Process.Start(psi); process.StandardInput.WriteLine(input); process.StandardInput.Close(); process.WaitForExit(); process.Close(); MessageBox.Show("database is restored"); } catch (IOException ex) { MessageBox.Show("Error , unable to Restore!"); }
Plz provide any suggestion....
-
BasePriority = 'process.BasePriority' threw an exception of type 'System.InvalidOperationException'...This is the exception I am getting while restoring the database from my .net application..Here I am providing the code....
try
{
//Read file from C:\
string path;
path = filetext.Text;
StreamReader file = new StreamReader(path);
string input = file.ReadToEnd();
file.Close();ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = @"C:\\Program Files (x86)\\MySQL\\MySQL Server 5.0\\bin\\mysqlimport.exe"; psi.RedirectStandardInput = true; psi.RedirectStandardOutput = false; psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}", userid, paswd, server, comboBox1.Text); psi.UseShellExecute = false; Console.WriteLine(psi); Process process = Process.Start(psi); process.StandardInput.WriteLine(input); process.StandardInput.Close(); process.WaitForExit(); process.Close(); MessageBox.Show("database is restored"); } catch (IOException ex) { MessageBox.Show("Error , unable to Restore!"); }
Plz provide any suggestion....
-
To the point. +5
-
BasePriority = 'process.BasePriority' threw an exception of type 'System.InvalidOperationException'...This is the exception I am getting while restoring the database from my .net application..Here I am providing the code....
try
{
//Read file from C:\
string path;
path = filetext.Text;
StreamReader file = new StreamReader(path);
string input = file.ReadToEnd();
file.Close();ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = @"C:\\Program Files (x86)\\MySQL\\MySQL Server 5.0\\bin\\mysqlimport.exe"; psi.RedirectStandardInput = true; psi.RedirectStandardOutput = false; psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}", userid, paswd, server, comboBox1.Text); psi.UseShellExecute = false; Console.WriteLine(psi); Process process = Process.Start(psi); process.StandardInput.WriteLine(input); process.StandardInput.Close(); process.WaitForExit(); process.Close(); MessageBox.Show("database is restored"); } catch (IOException ex) { MessageBox.Show("Error , unable to Restore!"); }
Plz provide any suggestion....
Yeah, I don't see such a statement, but maybe you need something like this:
try { process.PriorityClass = System.Diagnostics.ProcessPriorityClass.BelowNormal ; } catch { /\* The process probably already exited due to error \*/ }
-
Yeah, I don't see such a statement, but maybe you need something like this:
try { process.PriorityClass = System.Diagnostics.ProcessPriorityClass.BelowNormal ; } catch { /\* The process probably already exited due to error \*/ }
-
yes sir process is already exiting due to error .........i am also unable to understand why the process is exiting ...give some solution thanks
You'll need to check the output. You may need to redirect and capture the output.
-
You'll need to check the output. You may need to redirect and capture the output.
-