CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2011
    Posts
    7

    C# Firebird add user help

    Hi guys hope someone can help me. I am using C#3.0 and I need to add a new user to the firebird server with the click of a button . This is the code that i have :

    private void button1_Click(object sender, EventArgs e)
    {
    string firebirdInstallationPath1 = @"C:\Program Files\Firebird\Firebird_1_5\bin";

    System.Diagnostics.Process p = new System.Diagnostics.Process();
    p.StartInfo.WorkingDirectory = firebirdInstallationPath1;
    p.StartInfo.Arguments = @"-add Peter -pw books";
    p.StartInfo.FileName = "gsec.exe";
    p.Start();
    p.WaitForExit();
    }


    It seems to run when you click on the button, however doesn't add the user to the server. Can anyone please assist?

    Thanks

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: C# Firebird add user help

    Try set full path to the process image:
    Code:
    p.StartInfo.FileName = Path.Combine(firebirdInstallationPath1, "gsec.exe");
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured