[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
test[sqlite3] 002 Open and Close database
[ | db |
db := SQLiteDatabase openDatabase: '/data/data/net.smalltalking.s8.jx8/testdb' factory: nil flags: SQLiteDatabase openReadwrite.
db isOpen ifTrue: [ self print: 'DB successfully opened' ] ifFalse: [ self print: 'DB could not be opened' ].
db close.
db isOpen ifTrue: [ self print: 'DB could not be closed' ] ifFalse: [ self print: 'DB successfully closed' ]
] on: Error do: [:ex | self print: 'DB could not be opened' ]