C#Firebird添加用户帮助 [英] C# Firebird add user help

查看:49
本文介绍了C#Firebird添加用户帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,希望有人能帮助我.我使用的是C#3.0,我需要通过单击按钮将新用户添加到firebird服务器.这是我拥有的代码:

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();
}



当您单击该按钮时,它似乎可以运行,但是不会将用户添加到服务器中.谁能帮忙吗?

谢谢

[edit]忽略HTML ..."选项已禁用-OriginalGriff [/edit]



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]

推荐答案

如果您查看手册(RTFM时间!:laugh: ) http://www.destructor.de/firebird/gsec.htm [ 您需要做的第一件事是在命令行上登录,然后准备就绪时,通过标准输入(可能我没有尝试过)来添加您的add命令.
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).


这篇关于C#Firebird添加用户帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆