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
Re: C# Firebird add user help
Try set full path to the process image:
Code:
p.StartInfo.FileName = Path.Combine(firebirdInstallationPath1, "gsec.exe");