Database Guide

Working with logon specifications

The following examples show how create and work with logon specifications. They include instructions for doing the following:

"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: AbtIbmDatabaseManager.
 
"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: AbtIbmDatabaseManager.
AbtDbmSystem removeLogonSpecForDatabaseMgr: AbtIbmDatabaseManager.
 
"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'.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]