Xbasic
SQL::ConnectionAddUserToGroup Method
Syntax
Result_Flag as L = AddUserGroup(UserName as C, GroupName as C)
Arguments
- UserNameCharacter
The user's login name.
- GroupNameCharacter
The name of the group.
Returns
- Result_FlagLogical
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).
Description
Make the user a member of the group in the currently connected database or server.
Discussion
The SQL::Connection::AddUserToGroup() method makes UserName a member of the GroupName in the currently connected database or server.
Example
dim conn as SQL::Connection
dim connString as C
connString = "{A5API='SQLServer', Server='doc3000', Trusted_connection=yes, Database='Northwind'}"
if .not. conn.open(connString)
ui_msg_box("Error", conn.CallResult.text)
end
end if
if .not. conn.AddUserToGroup("Edward", "Techwriting")
ui_msg_box("Error", conn.CallResult.text)
end if
conn.close()See Also