saveDestConn (Attribute)



The saveDestConn attribute allows the programmer to change the default behavior of the ooSQLiteBackup object during finish . This behavior is to automatically close the destination connection if it was opened the connection during new (Class method) .

saveDestConn get: The value of thesaveDestConnis false if the ooSQLite framework is going to close the destination database connection,that it opened, during finish and true if the framework is not going to close the connection. The ooSQLite frameworknevercloses a connection it did not open. This implies that the value of thesaveDestConnis ignored unless the destination connection was opened internally by ooSQLite.
saveDestConn set: The programmer can set the value of thesaveDestConnto true or false. Attempting to set the value to anything else will raise a syntax condition.
Remarks: ThesaveDestConattribute can be accessed at any time, before or after finish has been invoked. Note that setting the attribute afterfinishhas been invoked has no effect.
Details This attribute is provided by ooSQLite, there is no similar API provided by SQLite.
Example: This example loads a database from disk into an in-memory database. It uses thesaveDestConnattribute to prevent ooSQLite from closing the in-memory connection and uses the getDestConn method to retrieve the database connection:
bu = .ooSQLiteBackup~new(srcConn, ":memory:")
if bu~initCode &gt.&lt. bu~OK then do
-- handle error ...
end
bu~saveDestConn = .true
bu~step(-1)
memConn = bu~getDestConn
...