Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

altafmohd

@altafmohd
About
Posts
36
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • problem in restoring mysql database
    A altafmohd

    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

    C# help database mysql sysadmin debugging

  • problem in restoring mysql database
    A altafmohd

    yes 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

    C# help database mysql sysadmin debugging

  • problem in restoring mysql database
    A altafmohd

    no sir i am devloping in windows 7 os

    C# help database mysql sysadmin debugging

  • problem in restoring mysql database
    A altafmohd

    when 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'

    C# help database mysql sysadmin debugging

  • problem in restoring mysql database
    A altafmohd

    sir 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!");
            }
        }
    
    C# help database mysql sysadmin debugging

  • Knowing about the prerequisites of .net
    A altafmohd

    I 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...

    .NET (Core and Framework) csharp database mysql hardware business

  • restore
    A altafmohd

    how i can do this ....provide what code i should use or steps to do that thanks in advance :):):)

    C# csharp database mysql sysadmin help

  • constructor
    A altafmohd

    sir 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

    C#

  • restore
    A altafmohd

    yes sir process is already exiting due to error .........i am also unable to understand why the process is exiting ...give some solution thanks

    C# csharp database mysql sysadmin help

  • primery key
    A altafmohd

    thank you very much sir :)

    MySQL database tutorial

  • primery key
    A altafmohd

    how to get primery key column in any table .......please provide the query for that or any other method thanx in advance :):)

    MySQL database tutorial

  • restoring database using c#
    A altafmohd

    sir but in this link the database is sql server and i am using mysql database ....:(

    C# help csharp database mysql sysadmin

  • restore database
    A altafmohd

    how to restore mysql database thrgh command line from a existing backup file at desktop ??????provide step by step solution thank you in advance :)

    MySQL tutorial database mysql question

  • restoring database using c#
    A altafmohd

    yes sir that is stored there ....ok i will run actualy there is problem in system as soon as it will be functioning well

    C# help csharp database mysql sysadmin

  • restoring database using c#
    A altafmohd

    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";

    C# help csharp database mysql sysadmin

  • restoring database using c#
    A altafmohd

    sir its 1

    C# help csharp database mysql sysadmin

  • restoring database using c#
    A altafmohd

    no result and no exception .....and code is running till the end ......

    C# help csharp database mysql sysadmin

  • restoring database using c#
    A altafmohd

    sir what do you mean by the output of mysqlimport.exe i did not get it .......could you please tell in detail thank you :)

    C# help csharp database mysql sysadmin

  • restoring database using c#
    A altafmohd

    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();
        }
    
    C# help csharp database mysql sysadmin

  • datagridview
    A altafmohd

    sir 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
    
    ASP.NET csharp database mysql
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups