Advanced Database Feature Guide


Connections (AbtDatabaseConnection -> UtyDB2Connection)

For Example, if the application had a method that looked like this:

| connection qs rs | 
connection := 
AbtDatabaseConnection 
connectToDatabaseNamed: 'SAMPLE' 
userid: 'userid' 
password: 'password'. 
qs := AbtQuerySpec new 
statement: 'SELECT * FROM STAFF' 
yourself. 
rs := connection resultTableFromQuerySpec: qs. 
 

it could be reworked as follows:

| connection sd | 
connection := UtyDB2DatabaseManager current 
connectTo: 'NTSAMPLE' as: 'db2admin' password: 'unity'. 
sd := connection newSqlDescriptor 
sql: 'SELECT * FROM STAFF'; 
yourself. 
rs := sd executeOn: connection. 
 


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