Xbasic
SQL::ConnectionAddUser Method
Syntax
Result_Flag as L = AddUser(UserName as C, Password as C)
Arguments
- UserNameCharacter
The user's login name.
- PasswordCharacter
The user's login password.
Returns
- Result_FlagLogical
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).
Description
Create a new user in the currently connected database or server.
Discussion
The AddUser() method creates a new user 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.adduser("Edward", "Techwriter")
ui_msg_box("Error", conn.CallResult.text)
end if
conn.close()See Also