这样添加用户,行不行?源码如下。(10分)

  • 主题发起人 主题发起人 土土
  • 开始时间 开始时间

土土

Unregistered / Unconfirmed
GUEST, unregistred user!
with frmdm.qrylogin do
begin
close;
sql.clear;
sql.add('EXEC sp_addlogin :user,:password');
parameters.ParamByName('user').Value :=edit1.Text ;
parameters.ParamByName('password').Value :=edit2.Text;
execsql;
close;
sql.clear;
sql.add('EXEC sp_adduser :user');
parameters.parambyname('user').value:=edit1.text;
execsql;
end;
 
好象不用“EXEC”吧[8D],你运行一下就结果了
 
正确,我在程序里也是这么处理的。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
736
import
I
I
回复
0
查看
571
import
I
后退
顶部