Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 :

C#
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

[edit]"Ignore HTML..." option disabled - OriginalGriff[/edit]
Posted
Updated 26-Jul-11 22:51pm
v2

1 solution

If you have a look at the manual (RTFM time! :laugh:) http://www.destructor.de/firebird/gsec.htm[^] you will see that "-add" is not a command line parameter - it is an instruction issued to it once it is running.
The first thing you need to do is log in on the command line, then when it is ready feed it your add command via the standard input (probably, I haven't tried it).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900