CodePudding user response:
dingdingCodePudding user response:
There is no solution?CodePudding user response:
You write from the query analyzer grammarTo the pb deposit a string
With a user is sa, the autocommit=true dynamic to try the execution of the transaction object
CodePudding user response:
May have to call with the master of the stored procedure sp_addlogin, sp_adduser, sp_droplongin, sp_dropuser.CodePudding user response:
String ls_sqlLs_sql="sp_addlogin 'sa_test', 'sa_test', 'master'"//add server user
The sqlca. The autocommit=true
The execute IMMEDIATE: ls_sql;
If the sqlca. Sqlcode<> 0 then
Messagebox (string (sqlca sqlcode), the sqlca. Sqlerrtext)
End the if
Ls_sql="EXEC sp_addsrvrolemember 'sa_test', 'sysadmin'" added to the dba in//
The execute IMMEDIATE: ls_sql;
If the sqlca. Sqlcode<> 0 then
Messagebox (string (sqlca sqlcode), the sqlca. Sqlerrtext)
End the if
The sqlca. The autocommit=false
CodePudding user response:
Sa as if can't delete it, didn't tryYou can add or delete your defined by the user
CodePudding user response:
Learning. Help