Working with logon specifications
The following examples show how to create and work with logon specifications. They include instructions for doing the following:
Creating logon specifications
Registering logon specifications with a database manager
Remove logon specifications from a database manager
 
SQLite note: SQLite does not support the concepts of users or logon. The SQLite database manager will ignore any logon specifications used to connect to a database.

"Create a new logon specification"
| logonSpec |
logonSpec := AbtDatabaseLogonSpec
id: 'userid'
password: 'password'
server: nil.
"Create a new logon specification with an alias."
| logonSpec |
logonSpec := AbtDatabaseLogonSpec
id: 'userid'
password: 'password'
server: nil
alias: 'SampleLogonSpec'.
"Create a new logon specification and register
it with a database manager."
| logonSpec |
logonSpec := AbtDatabaseLogonSpec
id: 'userid'
password: 'password'
server: nil.
AbtDbmSystem registerLogonSpec: logonSpec
forDatabaseMgr: AbtIbmCliDatabaseManager.
"Create a new logon specification and register
it with the database manager for the connection
alias given."
| logonSpec |
logonSpec := AbtDatabaseLogonSpec
id: 'userid'
password: 'password'
server: nil.
AbtDbmSystem registerLogonSpec: logonSpec
withAlias: 'SampleConSpec'.
"Remove a logon specification from a database manager."
| logonSpec |
logonSpec := AbtDatabaseLogonSpec
id: 'userid'
password: 'password'
server: nil.
AbtDbmSystem registerLogonSpec: logonSpec
forDatabaseMgr: AbtIbmCliDatabaseManager.
AbtDbmSystem removeLogonSpecForDatabaseMgr: AbtIbmCliDatabaseManager.
"Remove a logon specification from the databased manager
for the connection alias given."
| logonSpec |
logonSpec := AbtDatabaseLogonSpec
id: 'userid'
password: 'password'
server: nil.
AbtDbmSystem registerLogonSpec: logonSpec
withAlias: 'SampleConSpec'.
AbtDbmSystem removeLogonSpecWithAlias: 'SampleConSpec'.
Last modified date: 01/29/2015