but if i am not writing this in catch block then also same problem is coming ..i just posted this in catch block to check what is the problem in my code ...i dont know much about it ....so see the code is it right ?or what could be the problems
altafmohd
Posts
-
problem in restoring mysql database -
problem in restoring mysql databaseyes process is exiting actualy its exit code is showing 1.....but i dont know why it is happening which line is to be corected ...so please analyse my code and provide appropriate solution
-
problem in restoring mysql databaseno sir i am devloping in windows 7 os
-
problem in restoring mysql databasewhen i am debugging the code and reach to process line and right click at process we find lot of exceptions and first is this .....
BasePriority = 'process.BasePriority' threw an exception of type 'System.InvalidOperationException'
-
problem in restoring mysql databasesir when i am running this code then process is throwing an exception ....and value of exit code becoming 1 ....i dont know why it is happening so ..plz help me ..
public void Restore()
{
try
{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\\MySQL\\MySQL Server 5.0\\bin\\mysqlimport"; // psi.FileName = "mysql"; 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; Process process = new Process(); //process.StartInfo = psi; //process= Process.Start("IExplore.exe"); process = Process.Start(psi); //process.WaitForInputIdle(); //process.PriorityClass = System.Diagnostics.ProcessPriorityClass.BelowNormal; process.StandardInput.WriteLine(input); process.StandardInput.Close(); process.WaitForExit(); process.Close(); MessageBox.Show("database is restored"); } catch (IOException ex) { if (System.Diagnostics.Debugger.IsAttached) { Console.WriteLine(ex.ToString()); } else MessageBox.Show("Error , unable to Restore!"); } }
-
Knowing about the prerequisites of .netI am developing an application called mysql query browser in C#.net. I have to mention hardware and software requirements in my SRS.But I dont know how to know what are these and what is the reason behind this....so plz tell me....I am using .net 3.5..thanks...
-
restorehow i can do this ....provide what code i should use or steps to do that thanks in advance :):):)
-
constructorsir actualy i am passing one form reference in constructor to use its control in another form but i am not getting the control of first form in second form ....... please provide some solution
-
restoreyes sir process is already exiting due to error .........i am also unable to understand why the process is exiting ...give some solution thanks
-
primery keythank you very much sir :)
-
primery keyhow to get primery key column in any table .......please provide the query for that or any other method thanx in advance :):)
-
restoring database using c#sir but in this link the database is sql server and i am using mysql database ....:(
-
restore databasehow to restore mysql database thrgh command line from a existing backup file at desktop ??????provide step by step solution thank you in advance :)
-
restoring database using c#yes sir that is stored there ....ok i will run actualy there is problem in system as soon as it will be functioning well
-
restoring database using c#sir please tell me is this line which i am passing in filename of psi is correct or not? psi.FileName = @"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlimport.exe";
-
restoring database using c#sir its 1
-
restoring database using c#no result and no exception .....and code is running till the end ......
-
restoring database using c#sir what do you mean by the output of mysqlimport.exe i did not get it .......could you please tell in detail thank you :)
-
restoring database using c#sir i providing code by which i am implementing restore database ....but sir code is running successfully but no restoration is done at the end ...... help plz thanx in advance :)
public void Restore()
{
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\\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; 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!"); } } private void bstart\_Click(object sender, EventArgs e) { Restore(); }
-
datagridviewsir this is my code what i am using in my project .... there is a checkbox outside the gridview for checking the inside col cell of gridview and if i chk inside gridview col cell then it checks outside the gridview as it happens in mysql query browser .....thnx in advance
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
try
{
q = (string)dataGridView1.CurrentRow.Cells[0].Value;
if (q != null)
{
cntextbox.Text = (string)dataGridView1.CurrentRow.Cells[0].Value;
dttextbox.Text = (string)dataGridView1.CurrentRow.Cells[1].Value;if (Convert.ToBoolean(dataGridView1.CurrentRow.Cells\[4\].Value) == true) checkBox1.Checked = true; else checkBox1.Checked = false; if (Convert.ToBoolean(dataGridView1.CurrentRow.Cells\[2\].Value) == true) checkBox2.Checked = true; else checkBox2.Checked = false; if (Convert.ToBoolean(dataGridView1.CurrentRow.Cells\[3\].Value) == true) { foreach (DataGridViewRow dr in dataGridView1.Rows) { dr.Cells\[3\].Value = false; } checkBox3.Checked = true; } else checkBox3.Checked = false; } } catch (Exception) { } } private void checkBox1\_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) dataGridView1.CurrentRow.Cells\[4\].Value = true; else dataGridView1.CurrentRow.Cells\[4\].Value = false; } private void checkBox2\_CheckedChanged(object sender, EventArgs e) { if (checkBox2.Checked) dataGridView1.CurrentRow.Cells\[2\].Value = true; else dataGridView1.CurrentRow.Cells\[2\].Value = false; } private void dttextbox\_TextChanged(object sender, EventArgs e) { dataGridView1.CurrentRow.Cells\[1\].Value = dttextbox.Text; } private void cntextbox\_TextChanged(obj